Chromium Code Reviews| Index: build/common.gypi |
| diff --git a/build/common.gypi b/build/common.gypi |
| index e498d3eb467aeb94a8a835357a32be77ddc4f7f1..3ba4e640df970e2b1369678a6580fd534511e81f 100644 |
| --- a/build/common.gypi |
| +++ b/build/common.gypi |
| @@ -4148,7 +4148,7 @@ |
| '-g', |
| ], |
| 'ldflags': [ |
| - # We want to statically link libstdc++/libgcc_s. |
| + # We want to statically link libstdc++/libgcc. |
| '-static-libstdc++', |
| '-static-libgcc', |
| ], |
| @@ -4160,6 +4160,28 @@ |
| '-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': [ |
| + # Export the libstdc++ symbols so multiple copies |
| + # merge at runtime. |
|
byungchul
2015/12/02 01:03:22
The right description would be, "export the libstd
bcf
2015/12/02 02:26:02
Okay I reworded this sentence.
|
| + '-Wl,--export-dynamic', |
| + |
| + '-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', |
| + ], |
| + }] |
| + ], |
| }], |
| ], |
| }], |