diff options
author | Peter Powell <petpow@saberuk.com> | 2015-03-22 00:54:56 +0000 |
---|---|---|
committer | Peter Powell <petpow@saberuk.com> | 2015-05-13 15:22:44 +0100 |
commit | 01dee272ca360fe8cd227583061ec5a11c2dadc1 (patch) | |
tree | 0f3608fb74b7acb0ab8e8ae9caa7e10bb92d0d2a /make/unit-cc.pl | |
parent | 4b3e466c8027989fc3b453bdd5a55b2ed42e9d43 (diff) |
Remove run-cc.pl and all associated code.
As far as I can tell this only worked with older versions of GCC
and there is no value in fixing it as diagnostics have improved
since then and it makes errors hard to search for anyway.
This also shaves off an average of five seconds on each build on
my hardware. Neat!
Diffstat (limited to 'make/unit-cc.pl')
-rwxr-xr-x | make/unit-cc.pl | 31 |
1 files changed, 20 insertions, 11 deletions
diff --git a/make/unit-cc.pl b/make/unit-cc.pl index cbe38521c..0a20738db 100755 --- a/make/unit-cc.pl +++ b/make/unit-cc.pl @@ -27,7 +27,10 @@ BEGIN { use strict; use warnings FATAL => qw(all); +use File::Spec::Functions qw(abs2rel); + use make::configure; +use make::console; chdir $ENV{BUILDPATH}; @@ -56,6 +59,15 @@ if ($type eq 'gen-ld') { } exit 1; +sub message($$$) { + my ($type, $file, $command) = @_; + if ($verbose) { + print "$command\n"; + } else { + print_format "\t<|GREEN $type:|>\t\t$file\n"; + } +} + sub do_static_find { my @flags; for my $file (@ARGV) { @@ -68,7 +80,7 @@ sub do_static_find { } sub do_static_link { - my $execstr = "$ENV{RUNLD} -o $out $ENV{CORELDFLAGS}"; + my $execstr = "$ENV{CXX} -o $out $ENV{CORELDFLAGS}"; for (@ARGV) { if (/\.cmd$/) { open F, '<', $_; @@ -81,19 +93,19 @@ sub do_static_link { } } $execstr .= ' '.$ENV{LDLIBS}; - print "$execstr\n" if $verbose; + message 'LINK', $out, $execstr; exec $execstr; } sub do_core_link { - my $execstr = "$ENV{RUNLD} -o $out $ENV{CORELDFLAGS} @_ $ENV{LDLIBS}"; - print "$execstr\n" if $verbose; + my $execstr = "$ENV{CXX} -o $out $ENV{CORELDFLAGS} @_ $ENV{LDLIBS}"; + message 'LINK', $out, $execstr; exec $execstr; } sub do_link_dir { - my $execstr = "$ENV{RUNLD} -o $out $ENV{PICLDFLAGS} @_"; - print "$execstr\n" if $verbose; + my $execstr = "$ENV{CXX} -o $out $ENV{PICLDFLAGS} @_"; + message 'LINK', $out, $execstr; exec $execstr; } @@ -102,15 +114,12 @@ sub do_compile { my $flags = ''; my $libs = ''; - my $binary = $ENV{RUNCC}; if ($do_compile) { $flags = $ENV{CORECXXFLAGS} . ' ' . get_property($file, 'CompileFlags'); if ($file =~ m#(?:^|/)((?:m|core)_[^/. ]+)(?:\.cpp|/.*\.cpp)$#) { $flags .= ' -DMODNAME=\\"'.$1.'\\"'; } - } else { - $binary = $ENV{RUNLD}; } if ($do_link) { @@ -120,7 +129,7 @@ sub do_compile { $flags .= ' -c'; } - my $execstr = "$binary -o $out $flags $file $libs"; - print "$execstr\n" if $verbose; + my $execstr = "$ENV{CXX} -o $out $flags $file $libs"; + message 'BUILD', abs2rel($file, "$ENV{SOURCEPATH}/src"), $execstr; exec $execstr; } |