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

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

Issue 2766333002: Use llvm-ar when building with Clang. (Closed)
Patch Set: Move a comment Created 3 years, 9 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/posix/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/android/config.gni") 5 import("//build/config/android/config.gni")
6 import("//build/config/chrome_build.gni") 6 import("//build/config/chrome_build.gni")
7 import("//build/config/chromecast_build.gni") 7 import("//build/config/chromecast_build.gni")
8 import("//build/config/compiler/compiler.gni") 8 import("//build/config/compiler/compiler.gni")
9 import("//build/config/nacl/config.gni") 9 import("//build/config/nacl/config.gni")
10 import("//build/toolchain/cc_wrapper.gni") 10 import("//build/toolchain/cc_wrapper.gni")
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 } else if (is_android) { 161 } else if (is_android) {
162 configs += [ "//build/config/android:compiler" ] 162 configs += [ "//build/config/android:compiler" ]
163 } else if (is_linux) { 163 } else if (is_linux) {
164 configs += [ "//build/config/linux:compiler" ] 164 configs += [ "//build/config/linux:compiler" ]
165 } else if (is_nacl) { 165 } else if (is_nacl) {
166 configs += [ "//build/config/nacl:compiler" ] 166 configs += [ "//build/config/nacl:compiler" ]
167 } else if (is_ios || is_mac) { 167 } else if (is_ios || is_mac) {
168 configs += [ "//build/config/mac:compiler" ] 168 configs += [ "//build/config/mac:compiler" ]
169 } 169 }
170 170
171 # Applies to all Posix systems.
172 if (is_posix) {
173 configs += [ "//build/config/posix:compiler" ]
174 }
175
176 # See the definitions below. 171 # See the definitions below.
177 configs += [ 172 configs += [
178 ":compiler_cpu_abi", 173 ":compiler_cpu_abi",
179 ":compiler_codegen", 174 ":compiler_codegen",
180 ] 175 ]
181 176
182 # In general, Windows is totally different, but all the other builds share 177 # In general, Windows is totally different, but all the other builds share
183 # some common GCC configuration. 178 # some common GCC configuration.
184 if (!is_win) { 179 if (!is_win) {
185 # Common GCC compiler flags setup. 180 # Common GCC compiler flags setup.
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 } 297 }
303 298
304 # Linux/Android common flags setup. 299 # Linux/Android common flags setup.
305 # --------------------------------- 300 # ---------------------------------
306 if (is_linux || is_android) { 301 if (is_linux || is_android) {
307 if (use_pic) { 302 if (use_pic) {
308 cflags += [ "-fPIC" ] 303 cflags += [ "-fPIC" ]
309 ldflags += [ "-fPIC" ] 304 ldflags += [ "-fPIC" ]
310 } 305 }
311 306
312 cflags += [ "-pipe" ] # Use pipes for communicating between sub-processes. Faster. 307 # Use pipes for communicating between sub-processes. Faster.
308 cflags += [ "-pipe" ]
313 309
314 ldflags += [ 310 ldflags += [
315 "-Wl,-z,noexecstack", 311 "-Wl,-z,noexecstack",
316 "-Wl,-z,now", 312 "-Wl,-z,now",
317 "-Wl,-z,relro", 313 "-Wl,-z,relro",
318 ] 314 ]
319 if (!using_sanitizer) { 315 if (!using_sanitizer) {
320 if (!use_cfi_diag) { 316 if (!use_cfi_diag) {
321 ldflags += [ "-Wl,-z,defs" ] 317 ldflags += [ "-Wl,-z,defs" ]
322 } 318 }
(...skipping 1391 matching lines...) Expand 10 before | Expand all | Expand 10 after
1714 1710
1715 if (is_ios || is_mac) { 1711 if (is_ios || is_mac) {
1716 # On Mac and iOS, this enables support for ARC (automatic ref-counting). 1712 # On Mac and iOS, this enables support for ARC (automatic ref-counting).
1717 # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html. 1713 # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html.
1718 config("enable_arc") { 1714 config("enable_arc") {
1719 common_flags = [ "-fobjc-arc" ] 1715 common_flags = [ "-fobjc-arc" ]
1720 cflags_objc = common_flags 1716 cflags_objc = common_flags
1721 cflags_objcc = common_flags 1717 cflags_objcc = common_flags
1722 } 1718 }
1723 } 1719 }
OLDNEW
« no previous file with comments | « no previous file | build/config/posix/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698