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 import("//build/config/chromecast_build.gni") |
| 6 |
| 7 assert(is_chromecast) |
| 8 |
| 9 config("static_config") { |
| 10 ldflags = [ |
| 11 # We want to statically link libstdc++/libgcc. |
| 12 "-static-libstdc++", |
| 13 "-static-libgcc", |
| 14 ] |
| 15 } |
| 16 |
| 17 config("executable_config") { |
| 18 ldflags = [ |
| 19 # Export stdlibc++ and libgcc symbols to force shlibs to refer to these |
| 20 # symbols from the executable. |
| 21 "-Wl,--export-dynamic", |
| 22 |
| 23 "-lm", # stdlibc++ requires math.h |
| 24 |
| 25 # In case we redefined stdlibc++ symbols (e.g. tc_malloc) |
| 26 "-Wl,--allow-multiple-definition", |
| 27 |
| 28 "-Wl,--whole-archive", |
| 29 "-l:libstdc++.a", |
| 30 "-l:libgcc.a", |
| 31 "-Wl,--no-whole-archive", |
| 32 ] |
| 33 |
| 34 # Despite including libstdc++/libgcc archives, we still need to specify |
| 35 # static linking for them in order to prevent the executable from having a |
| 36 # dynamic dependency on them. |
| 37 configs = [ ":static_config" ] |
| 38 } |
| 39 |
| 40 config("shared_library_config") { |
| 41 configs = [ ":static_config" ] |
| 42 } |
OLD | NEW |