Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(168)

Side by Side Diff: build/config/gcc/BUILD.gn

Issue 1236503002: GN: Use lib.unstripped rather than lib.stripped. Add a toolchain.gni (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@gn15
Patch Set: add comment Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « build/config/android/rules.gni ('k') | build/toolchain/android/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/toolchain/toolchain.gni")
6
5 # This config causes functions not to be automatically exported from shared 7 # This config causes functions not to be automatically exported from shared
6 # libraries. By default, all symbols are exported but this means there are 8 # 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 9 # lots of exports that slow everything down. In general we explicitly mark
8 # which functiosn we want to export from components. 10 # which functiosn we want to export from components.
9 # 11 #
10 # Some third_party code assumes all functions are exported so this is separated 12 # 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 13 # into its own config so such libraries can remove this config to make symbols
12 # public again. 14 # public again.
13 # 15 #
14 # See http://gcc.gnu.org/wiki/Visibility 16 # See http://gcc.gnu.org/wiki/Visibility
15 config("symbol_visibility_hidden") { 17 config("symbol_visibility_hidden") {
16 # Note that -fvisibility-inlines-hidden is set globally in the compiler 18 # Note that -fvisibility-inlines-hidden is set globally in the compiler
17 # config since that can almost always be applied. 19 # config since that can almost always be applied.
18 cflags = [ "-fvisibility=hidden" ] 20 cflags = [ "-fvisibility=hidden" ]
19 } 21 }
20 22
21 # Settings for executables and shared libraries. 23 # Settings for executables and shared libraries.
22 config("executable_ldconfig") { 24 config("executable_ldconfig") {
23 if (is_android) { 25 if (is_android) {
24 ldflags = [ 26 ldflags = [
25 "-Bdynamic", 27 "-Bdynamic",
26 "-Wl,-z,nocopyreloc", 28 "-Wl,-z,nocopyreloc",
27 ] 29 ]
28 } else { 30 } else {
29 # Android doesn't support rpath. 31 # Note: Android doesn't support rpath.
32 rpath_link = ""
33 if (shlib_subdir != ".") {
34 rpath_link = "${shlib_subdir}/"
35 }
30 ldflags = [ 36 ldflags = [
31 # Want to pass "\$". GN will re-escape as required for ninja. 37 # Want to pass "\$". GN will re-escape as required for ninja.
32 "-Wl,-rpath=\$ORIGIN/", 38 "-Wl,-rpath=\$ORIGIN/${rpath_link}",
33 "-Wl,-rpath-link=", 39 "-Wl,-rpath-link=${rpath_link}",
34 40
35 # Newer binutils don't set DT_RPATH unless you disable "new" dtags 41 # Newer binutils don't set DT_RPATH unless you disable "new" dtags
36 # and the new DT_RUNPATH doesn't work without --no-as-needed flag. 42 # and the new DT_RUNPATH doesn't work without --no-as-needed flag.
37 "-Wl,--disable-new-dtags", 43 "-Wl,--disable-new-dtags",
38 ] 44 ]
39 } 45 }
40 } 46 }
41 47
42 config("no_exceptions") { 48 config("no_exceptions") {
43 cflags_cc = [ "-fno-exceptions" ] 49 cflags_cc = [ "-fno-exceptions" ]
44 cflags_objcc = cflags_cc 50 cflags_objcc = cflags_cc
45 } 51 }
OLDNEW
« no previous file with comments | « build/config/android/rules.gni ('k') | build/toolchain/android/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698