summaryrefslogtreecommitdiff
path: root/make/unit-cc.pl
diff options
context:
space:
mode:
authorAttila Molnar <attilamolnar@hush.com>2015-06-03 17:46:07 +0200
committerAttila Molnar <attilamolnar@hush.com>2015-06-03 17:46:07 +0200
commit6b2438f548aa8b2b2c26b94a8f782a11e87370be (patch)
tree9ec29b73da34640f42d9feeb0ceda74cee72c0be /make/unit-cc.pl
parent61696290a6ba5a2a862a0fa43508767886da3497 (diff)
parentcf94052d8fae19b12e43e25eb154ab89e2648f56 (diff)
Merge pull request #1054 from SaberUK/master+fix-linking-modules
Fix modules with 2+ files not having their LinkerFlags parsed.
Diffstat (limited to 'make/unit-cc.pl')
-rwxr-xr-xmake/unit-cc.pl6
1 files changed, 5 insertions, 1 deletions
diff --git a/make/unit-cc.pl b/make/unit-cc.pl
index 0a20738db..aba14a0bc 100755
--- a/make/unit-cc.pl
+++ b/make/unit-cc.pl
@@ -104,7 +104,11 @@ sub do_core_link {
}
sub do_link_dir {
- my $execstr = "$ENV{CXX} -o $out $ENV{PICLDFLAGS} @_";
+ my ($dir, $link_flags) = (shift, '');
+ for my $file (<$dir/*.cpp>) {
+ $link_flags .= get_property($file, 'LinkerFlags') . ' ';
+ }
+ my $execstr = "$ENV{CXX} -o $out $ENV{PICLDFLAGS} $link_flags @_";
message 'LINK', $out, $execstr;
exec $execstr;
}