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

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

Issue 2180653002: Attempt to fix Mac ASAN build in GN. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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/sanitizers/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 (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/ios/ios_sdk.gni") 6 import("//build/config/ios/ios_sdk.gni")
7 import("//build/config/mac/mac_sdk.gni") 7 import("//build/config/mac/mac_sdk.gni")
8 import("//build/config/mac/symbols.gni") 8 import("//build/config/mac/symbols.gni")
9 import("//build/config/sanitizers/sanitizers.gni")
9 10
10 # This is included by reference in the //build/config/compiler config that 11 # This is included by reference in the //build/config/compiler config that
11 # is applied to all targets. It is here to separate out the logic. 12 # is applied to all targets. It is here to separate out the logic.
12 # 13 #
13 # This is applied to BOTH desktop Mac and iOS targets. 14 # This is applied to BOTH desktop Mac and iOS targets.
14 config("compiler") { 15 config("compiler") {
15 # These flags are shared between the C compiler and linker. 16 # These flags are shared between the C compiler and linker.
16 common_mac_flags = [] 17 common_mac_flags = []
17 18
18 # CPU architecture. 19 # CPU architecture.
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 # (Included by system header. Also exists on iOS but not included.) 86 # (Included by system header. Also exists on iOS but not included.)
86 # http://opensource.apple.com/source/CarbonHeaders/CarbonHeaders-18.1/Assert Macros.h 87 # http://opensource.apple.com/source/CarbonHeaders/CarbonHeaders-18.1/Assert Macros.h
87 defines = [ "__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORE=0" ] 88 defines = [ "__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORE=0" ]
88 } 89 }
89 } 90 }
90 91
91 # On Mac, this is used for everything except static libraries. 92 # On Mac, this is used for everything except static libraries.
92 config("mac_dynamic_flags") { 93 config("mac_dynamic_flags") {
93 ldflags = [ "-Wl,-ObjC" ] # Always load Objective-C categories and classes. 94 ldflags = [ "-Wl,-ObjC" ] # Always load Objective-C categories and classes.
94 95
95 if (is_component_build) { 96 if (is_component_build || is_asan) {
96 ldflags += [ 97 ldflags += [
97 # Path for loading shared libraries for unbundled binaries. 98 # Path for loading shared libraries for unbundled binaries.
98 "-Wl,-rpath,@loader_path/.", 99 "-Wl,-rpath,@loader_path/.",
99 100
100 # Path for loading shared libraries for bundled binaries. Get back from 101 # Path for loading shared libraries for bundled binaries. Get back from
101 # Binary.app/Contents/MacOS. 102 # Binary.app/Contents/MacOS.
102 "-Wl,-rpath,@loader_path/../../..", 103 "-Wl,-rpath,@loader_path/../../..",
103 ] 104 ]
104 } 105 }
105 } 106 }
(...skipping 17 matching lines...) Expand all
123 # after running "lipo" too. 124 # after running "lipo" too.
124 _enable_stripping = false 125 _enable_stripping = false
125 } else { 126 } else {
126 _enable_stripping = enable_stripping 127 _enable_stripping = enable_stripping
127 } 128 }
128 129
129 if (_enable_stripping) { 130 if (_enable_stripping) {
130 ldflags = [ "-Wcrl,strip,-x,-S" ] 131 ldflags = [ "-Wcrl,strip,-x,-S" ]
131 } 132 }
132 } 133 }
OLDNEW
« no previous file with comments | « no previous file | build/config/sanitizers/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698