Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 # Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 import("//build/config/compiler/compiler.gni") | 5 import("//build/config/compiler/compiler.gni") |
| 6 import("//build/config/sanitizers/sanitizers.gni") | 6 import("//build/config/sanitizers/sanitizers.gni") |
| 7 import("//build/config/sysroot.gni") | 7 import("//build/config/sysroot.gni") |
| 8 import("//build/toolchain/toolchain.gni") | 8 import("//build/toolchain/toolchain.gni") |
| 9 | 9 |
| 10 # This config causes functions not to be automatically exported from shared | 10 # This config causes functions not to be automatically exported from shared |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 64 ldflags = [ | 64 ldflags = [ |
| 65 # Want to pass "\$". GN will re-escape as required for ninja. | 65 # Want to pass "\$". GN will re-escape as required for ninja. |
| 66 "-Wl,-rpath=\$ORIGIN/${rpath_link}", | 66 "-Wl,-rpath=\$ORIGIN/${rpath_link}", |
| 67 "-Wl,-rpath-link=${rpath_link}", | 67 "-Wl,-rpath-link=${rpath_link}", |
| 68 ] | 68 ] |
| 69 } | 69 } |
| 70 } | 70 } |
| 71 | 71 |
| 72 # Settings for executables. | 72 # Settings for executables. |
| 73 config("executable_ldconfig") { | 73 config("executable_ldconfig") { |
| 74 # WARNING! //sandbox/linux:chrome_sandbox will not pick up this | |
| 75 # config, because it is a setuid binary that needs special flags. | |
| 76 # If you add things to this config, make sure you check to see | |
| 77 # if they should be added to that target as well. | |
|
Dirk Pranke
2016/06/09 00:41:49
In theory I could split this out into two configs
| |
| 74 ldflags = [] | 78 ldflags = [] |
| 75 if (is_android) { | 79 if (is_android) { |
| 76 ldflags += [ | 80 ldflags += [ |
| 77 "-Bdynamic", | 81 "-Bdynamic", |
| 78 "-Wl,-z,nocopyreloc", | 82 "-Wl,-z,nocopyreloc", |
| 79 ] | 83 ] |
| 80 } else { | 84 } else { |
| 81 # See the rpath_for... config above for why this is necessary for component | 85 # See the rpath_for... config above for why this is necessary for component |
| 82 # builds. Sanitizers use a custom libc++ where this is also necessary. | 86 # builds. Sanitizers use a custom libc++ where this is also necessary. |
| 83 if (is_component_build || using_sanitizer) { | 87 if (is_component_build || using_sanitizer) { |
| (...skipping 26 matching lines...) Expand all Loading... | |
| 110 # and the new DT_RUNPATH doesn't work without --no-as-needed flag. | 114 # and the new DT_RUNPATH doesn't work without --no-as-needed flag. |
| 111 "-Wl,--disable-new-dtags", | 115 "-Wl,--disable-new-dtags", |
| 112 ] | 116 ] |
| 113 } | 117 } |
| 114 } | 118 } |
| 115 | 119 |
| 116 config("no_exceptions") { | 120 config("no_exceptions") { |
| 117 cflags_cc = [ "-fno-exceptions" ] | 121 cflags_cc = [ "-fno-exceptions" ] |
| 118 cflags_objcc = cflags_cc | 122 cflags_objcc = cflags_cc |
| 119 } | 123 } |
| OLD | NEW |