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

Unified Diff: build/config/chromecast/BUILD.gn

Issue 2288953002: [Chromecast] Only include all libstdc++/libgcc symbols in executable as needed (Closed)
Patch Set: Moved more flags per comments by bcf Created 4 years, 4 months 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 | chromecast/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/config/chromecast/BUILD.gn
diff --git a/build/config/chromecast/BUILD.gn b/build/config/chromecast/BUILD.gn
index f1cbfe61946fb68e18ab195dc1e3e9aae4012ad7..0aab2a907953f724a528c6876394ce10cd779bae 100644
--- a/build/config/chromecast/BUILD.gn
+++ b/build/config/chromecast/BUILD.gn
@@ -34,9 +34,9 @@ config("ldconfig") {
]
}
-config("executable_config") {
- configs = [ ":ldconfig" ]
-
+# whole archiving libgcc.a and libstdc++ is needed if dynamic share libs are
bcf 2016/08/29 23:26:15 Super nit: Capitalize and use periods at end of se
+# used, see b/25566835
+config("executable_whole_archive_config") {
if (current_cpu == "arm") {
ldflags = [
# Export stdlibc++ and libgcc symbols to force shlibs to refer to these
@@ -48,15 +48,21 @@ config("executable_config") {
# In case we redefined stdlibc++ symbols (e.g. tc_malloc)
"-Wl,--allow-multiple-definition",
+ # adding all symbols from libgcc and libstdc++
"-Wl,--whole-archive",
"-l:libstdc++.a",
"-l:libgcc.a",
"-Wl,--no-whole-archive",
]
+ }
+}
- # Despite including libstdc++/libgcc archives, we still need to specify
- # static linking for them in order to prevent the executable from having a
- # dynamic dependency on them.
+config("executable_config") {
+ configs = [ ":ldconfig" ]
+
+ if (current_cpu == "arm") {
+ # static linking in order to prevent the executable from having a dynamic
bcf 2016/08/29 23:26:15 "Statically link libstdc++ and libgcc to avoid hav
bcf 2016/08/29 23:40:36 Can you make this sentence more clear? By itself i
antz1 2016/08/30 00:00:28 Done.
+ # dependency on them.
configs += [ ":static_config" ]
}
}
« no previous file with comments | « no previous file | chromecast/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698