1 # Copyright 2014 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.
5 # This config causes functions not to be automatically exported from shared
6 # libraries. By default, all symbols are exported but this means there are
7 # lots of exports that slow everything down. In general we explicitly mark
8 # which functiosn we want to export from components.
10 # Some third_party code assumes all functions are exported so this is separated
11 # into its own config so such libraries can remove this config to make symbols
14 # See http://gcc.gnu.org/wiki/Visibility
15 config("symbol_visibility_hidden") {
16 # Note that -fvisibility-inlines-hidden is set globally in the compiler
17 # config since that can almost always be applied.
18 cflags = [ "-fvisibility=hidden" ]
21 # Settings for executables and shared libraries.
22 config("executable_ldconfig") {
24 # Want to pass "\$". GN will re-escape as required for ninja.
25 "-Wl,-rpath=\$ORIGIN/",
28 # Newer binutils don't set DT_RPATH unless you disable "new" dtags
29 # and the new DT_RUNPATH doesn't work without --no-as-needed flag.
30 "-Wl,--disable-new-dtags",
41 config("no_exceptions") {
42 cflags_cc = [ "-fno-exceptions" ]