Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(101)

Unified Diff: build/common.gypi

Issue 1476923004: [Chromecast] Include all stdlibc++/libgcc symbols in cast_shell. (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: Style updates. Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | build/config/BUILDCONFIG.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/common.gypi
diff --git a/build/common.gypi b/build/common.gypi
index e498d3eb467aeb94a8a835357a32be77ddc4f7f1..40e5a521b370227da83bbb1a688d7ac16721f6c0 100644
--- a/build/common.gypi
+++ b/build/common.gypi
@@ -4149,6 +4149,9 @@
],
'ldflags': [
# We want to statically link libstdc++/libgcc_s.
+ # Export the libstdc++ symbols so multiple copies merge
+ # at runtime.
+ '-Wl,--export-dynamic',
slan 2015/12/01 19:29:32 If we go this route, this needs to be echoed in GN
bcf 2015/12/01 19:52:30 Done.
'-static-libstdc++',
'-static-libgcc',
],
@@ -4160,6 +4163,24 @@
'-march=armv7-a',
'-mtune=cortex-a8',
],
+ 'target_conditions': [
+ [ '_type=="executable"', {
+ # Statically link whole libstdc++ and libgcc in
+ # executables to ensure only one copy at runtime.
+ 'ldflags': [
+ '-lm', # stdlibc++ requires math.h
+
+ # In case we redefined stdlibc++ symbols
+ # (e.g. tc_malloc)
+ '-Wl,--allow-multiple-definition',
+
+ '-Wl,--whole-archive',
+ '-l:libstdc++.a',
+ '-l:libgcc.a',
+ '-Wl,--no-whole-archive',
+ ],
+ }]
+ ],
}],
],
}],
« no previous file with comments | « no previous file | build/config/BUILDCONFIG.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698