Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 # Copyright 2015 The Chromium Authors. All rights reserved. | |
| 2 # Use of this source code is governed by a BSD-style license that can be | |
| 3 # found in the LICENSE file. | |
| 4 | |
| 5 assert(is_chromecast) | |
| 6 | |
| 7 config("static_config") { | |
| 8 ldflags = [ | |
| 9 # We want to statically link libstdc++/libgcc. Export the libstdc++ | |
| 10 # symbols so multiple copies merge at runtime. | |
| 11 "-Wl,--export-dynamic", | |
|
byungchul
2015/12/01 21:22:48
Why isn't it only for executables?
| |
| 12 "-static-libstdc++", | |
| 13 "-static-libgcc", | |
| 14 ] | |
| 15 } | |
| 16 | |
| 17 config("whole_libstdcxx_config") { | |
| 18 ldflags = [ | |
| 19 "-lm", # stdlibc++ requires math.h | |
| 20 | |
| 21 # In case we redefined stdlibc++ symbols (e.g. tc_malloc) | |
| 22 "-Wl,--allow-multiple-definition", | |
| 23 | |
| 24 "-Wl,--whole-archive", | |
| 25 "-l:libstdc++.a", | |
| 26 "-l:libgcc.a", | |
| 27 "-Wl,--no-whole-archive", | |
| 28 ] | |
| 29 } | |
| 30 | |
| 31 config("executable_config") { | |
| 32 # Order matters, so we define a separate config for whole stdlibc++/libgcc | |
| 33 configs = [ | |
| 34 ":static_config", | |
| 35 ":whole_libstdcxx_config", | |
| 36 ] | |
| 37 } | |
| 38 | |
| 39 config("shlib_config") { | |
| 40 configs = [ ":static_config" ] | |
| 41 } | |
| OLD | NEW |