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

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

Issue 2157573002: [Mac/GN] Add a new linker_driver.py option to save unstripped linker output. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Compiler config Created 4 years, 5 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 | « no previous file | build/config/mac/symbols.gni » ('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 (c) 2013 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2013 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/sysroot.gni") 5 import("//build/config/sysroot.gni")
6 import("//build/config/mac/mac_sdk.gni") 6 import("//build/config/mac/mac_sdk.gni")
7 import("//build/config/mac/symbols.gni") 7 import("//build/config/mac/symbols.gni")
8 8
9 # This is included by reference in the //build/config/compiler config that 9 # This is included by reference in the //build/config/compiler config that
10 # is applied to all targets. It is here to separate out the logic. 10 # is applied to all targets. It is here to separate out the logic.
(...skipping 30 matching lines...) Expand all
41 cflags = common_mac_flags 41 cflags = common_mac_flags
42 42
43 # Without this, the constructors and destructors of a C++ object inside 43 # Without this, the constructors and destructors of a C++ object inside
44 # an Objective C struct won't be called, which is very bad. 44 # an Objective C struct won't be called, which is very bad.
45 cflags_objcc = [ "-fobjc-call-cxx-cdtors" ] 45 cflags_objcc = [ "-fobjc-call-cxx-cdtors" ]
46 46
47 cflags_c = [ "-std=c99" ] 47 cflags_c = [ "-std=c99" ]
48 cflags_objc = cflags_c 48 cflags_objc = cflags_c
49 49
50 ldflags = common_mac_flags 50 ldflags = common_mac_flags
51
52 if (save_unstripped_output) {
53 ldflags += [ "-Wcrl,unstripped," + rebase_path(root_out_dir) ]
54 }
51 } 55 }
52 56
53 # This is included by reference in the //build/config/compiler:runtime_library 57 # This is included by reference in the //build/config/compiler:runtime_library
54 # config that is applied to all targets. It is here to separate out the logic 58 # config that is applied to all targets. It is here to separate out the logic
55 # that is Mac-only. Please see that target for advice on what should go in 59 # that is Mac-only. Please see that target for advice on what should go in
56 # :runtime_library vs. :compiler. 60 # :runtime_library vs. :compiler.
57 config("runtime_library") { 61 config("runtime_library") {
58 common_flags = [ 62 common_flags = [
59 "-isysroot", 63 "-isysroot",
60 sysroot, 64 sysroot,
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 # //build/toolchain/mac/linker_driver.py. 104 # //build/toolchain/mac/linker_driver.py.
101 # Remove this config if a target wishes to change the arguments passed to the 105 # Remove this config if a target wishes to change the arguments passed to the
102 # strip command during linking. This config by default strips all symbols 106 # strip command during linking. This config by default strips all symbols
103 # from a binary, but some targets may wish to specify a saves file to preserve 107 # from a binary, but some targets may wish to specify a saves file to preserve
104 # specific symbols. 108 # specific symbols.
105 config("strip_all") { 109 config("strip_all") {
106 if (enable_stripping) { 110 if (enable_stripping) {
107 ldflags = [ "-Wcrl,strip,-x,-S" ] 111 ldflags = [ "-Wcrl,strip,-x,-S" ]
108 } 112 }
109 } 113 }
OLDNEW
« no previous file with comments | « no previous file | build/config/mac/symbols.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698