Index: build/config/chromecast/BUILD.gn |
diff --git a/build/config/chromecast/BUILD.gn b/build/config/chromecast/BUILD.gn |
index f1cbfe61946fb68e18ab195dc1e3e9aae4012ad7..848033cc367db9da4236420b0b4d30adbeb58345 100644 |
--- a/build/config/chromecast/BUILD.gn |
+++ b/build/config/chromecast/BUILD.gn |
@@ -34,6 +34,20 @@ config("ldconfig") { |
] |
} |
+# whole archiving libgcc.a and libstdc++ is needed if dynamic share libs are |
+# used, see b/25566835 |
+config("executable_whole_archive_config") { |
+ if (current_cpu == "arm") { |
+ ldflags = [ |
+ # adding all symbols from libgcc and libstdc++ |
+ "-Wl,--whole-archive", |
+ "-l:libstdc++.a", |
+ "-l:libgcc.a", |
+ "-Wl,--no-whole-archive", |
+ ] |
+ } |
+} |
+ |
config("executable_config") { |
configs = [ ":ldconfig" ] |
@@ -47,11 +61,6 @@ config("executable_config") { |
# 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", |
] |
# Despite including libstdc++/libgcc archives, we still need to specify |