Chromium Code Reviews| Index: build/config/chromecast/BUILD.gn |
| diff --git a/build/config/chromecast/BUILD.gn b/build/config/chromecast/BUILD.gn |
| index 41f1c079638218a271fe6184f0f78fd10483fe3f..54abb102329054f64719f5e6428e45c48555d8ab 100644 |
| --- a/build/config/chromecast/BUILD.gn |
| +++ b/build/config/chromecast/BUILD.gn |
| @@ -15,28 +15,35 @@ config("static_config") { |
| } |
| config("executable_config") { |
| - ldflags = [ |
| - # Export stdlibc++ and libgcc symbols to force shlibs to refer to these |
| - # symbols from the executable. |
| - "-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", |
| - ] |
| - |
| - # 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. |
| - configs = [ ":static_config" ] |
| + ldflags = [] |
|
slan
2015/12/10 01:25:54
No need to delcare these here, just assign them di
bcf
2015/12/10 01:46:38
Done.
|
| + configs = [] |
| + |
| + if (current_cpu == "arm") { |
|
bcf
2015/12/10 01:17:21
Is it more preferred to put the conditionals in th
|
| + ldflags += [ |
| + # Export stdlibc++ and libgcc symbols to force shlibs to refer to these |
| + # symbols from the executable. |
| + "-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", |
| + ] |
| + |
| + # 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. |
| + configs += [ ":static_config" ] |
| + } |
| } |
| config("shared_library_config") { |
| - configs = [ ":static_config" ] |
| + if (current_cpu == "arm") { |
| + configs = [ ":static_config" ] |
| + } |
| } |