]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - make/unit-cc.pl
Disable RTTI in release builds (compile with -fno-rtti)
[user/henk/code/inspircd.git] / make / unit-cc.pl
index a494fb74b06d712a21278c5f22c91cee0e6ef139..66e9b15dcc2356b4c035fc42042f1c5d039198eb 100755 (executable)
@@ -68,7 +68,7 @@ exit 1;
 sub do_static_find {
        my @flags;
        for my $file (@ARGV) {
-               push @flags, getlinkerflags($file);
+               push @flags, get_property($file, 'LinkerFlags');
        }
        open F, '>', $out;
        print F join ' ', @flags;
@@ -113,12 +113,10 @@ sub do_compile {
        my $libs = '';
        my $binary = $ENV{RUNCC};
        if ($do_compile) {
-               $flags = $ENV{CXXFLAGS};
-               $flags =~ s/ -pedantic// if nopedantic($file);
-               $flags .= ' ' . getcompilerflags($file);
+               $flags = $ENV{CORECXXFLAGS} . ' ' . get_property($file, 'CompileFlags');
 
-               if ($file =~ m#(?:^|/)((?:m|cmd)_[^/. ]+)(?:\.cpp|/.*\.cpp)$#) {
-                       $flags .= ' -DMODNAME='.$1.'.so';
+               if ($file =~ m#(?:^|/)((?:m|core)_[^/. ]+)(?:\.cpp|/.*\.cpp)$#) {
+                       $flags .= ' -DMODNAME=\\"'.$1.'\\"';
                }
        } else {
                $binary = $ENV{RUNLD};
@@ -126,7 +124,7 @@ sub do_compile {
 
        if ($do_link) {
                $flags = join ' ', $flags, $ENV{PICLDFLAGS};
-               $libs = join ' ', getlinkerflags($file);
+               $libs = get_property($file, 'LinkerFlags');
        } else {
                $flags .= ' -c';
        }