OLD | NEW |
---|---|
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/compiler/compiler.gni") | 7 import("//build/config/compiler/compiler.gni") |
8 import("//build/config/nacl/config.gni") | 8 import("//build/config/nacl/config.gni") |
9 import("//build/toolchain/cc_wrapper.gni") | 9 import("//build/toolchain/cc_wrapper.gni") |
10 import("//build/toolchain/toolchain.gni") | 10 import("//build/toolchain/toolchain.gni") |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
159 } else if (is_android) { | 159 } else if (is_android) { |
160 configs += [ "//build/config/android:compiler" ] | 160 configs += [ "//build/config/android:compiler" ] |
161 } else if (is_linux) { | 161 } else if (is_linux) { |
162 configs += [ "//build/config/linux:compiler" ] | 162 configs += [ "//build/config/linux:compiler" ] |
163 } else if (is_nacl) { | 163 } else if (is_nacl) { |
164 configs += [ "//build/config/nacl:compiler" ] | 164 configs += [ "//build/config/nacl:compiler" ] |
165 } else if (is_ios || is_mac) { | 165 } else if (is_ios || is_mac) { |
166 configs += [ "//build/config/mac:compiler" ] | 166 configs += [ "//build/config/mac:compiler" ] |
167 } | 167 } |
168 | 168 |
169 # Applies to all Posix systems. | |
170 if (is_posix) { | |
171 configs += [ "//build/config/posix:compiler" ] | |
172 } | |
173 | |
174 # See the definitions below. | 169 # See the definitions below. |
175 configs += [ | 170 configs += [ |
176 ":compiler_cpu_abi", | 171 ":compiler_cpu_abi", |
177 ":compiler_codegen", | 172 ":compiler_codegen", |
178 ] | 173 ] |
179 | 174 |
180 # In general, Windows is totally different, but all the other builds share | 175 # In general, Windows is totally different, but all the other builds share |
181 # some common GCC configuration. | 176 # some common GCC configuration. |
182 if (!is_win) { | 177 if (!is_win) { |
183 # Common GCC compiler flags setup. | 178 # Common GCC compiler flags setup. |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
296 } else { | 291 } else { |
297 cflags += [ "-funwind-tables" ] | 292 cflags += [ "-funwind-tables" ] |
298 } | 293 } |
299 } | 294 } |
300 } | 295 } |
301 | 296 |
302 # Linux/Android common flags setup. | 297 # Linux/Android common flags setup. |
303 # --------------------------------- | 298 # --------------------------------- |
304 if (is_linux || is_android) { | 299 if (is_linux || is_android) { |
305 if (use_pic) { | 300 if (use_pic) { |
306 cflags += [ | 301 cflags += [ "-fPIC" ] |
307 "-fPIC", | 302 ldflags += [ "-fPIC" ] |
308 ] | |
309 ldflags += [ | |
310 "-fPIC", | |
311 ] | |
312 } | 303 } |
313 | 304 |
314 cflags += [ | 305 cflags += [ "-pipe" ] # Use pipes for communicating between sub-processes. Faster. |
Nico
2017/03/27 17:10:39
Nit: put comment above += line (yes, not your code
krasin1
2017/03/27 17:51:23
Done.
| |
315 "-pipe", # Use pipes for communicating between sub-processes. Faster. | |
316 ] | |
317 | 306 |
318 ldflags += [ | 307 ldflags += [ |
319 "-Wl,-z,noexecstack", | 308 "-Wl,-z,noexecstack", |
320 "-Wl,-z,now", | 309 "-Wl,-z,now", |
321 "-Wl,-z,relro", | 310 "-Wl,-z,relro", |
322 ] | 311 ] |
323 if (!using_sanitizer) { | 312 if (!using_sanitizer) { |
324 if (!use_cfi_diag) { | 313 if (!use_cfi_diag) { |
325 ldflags += [ "-Wl,-z,defs" ] | 314 ldflags += [ "-Wl,-z,defs" ] |
326 } | 315 } |
(...skipping 1387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1714 | 1703 |
1715 if (is_ios || is_mac) { | 1704 if (is_ios || is_mac) { |
1716 # On Mac and iOS, this enables support for ARC (automatic ref-counting). | 1705 # On Mac and iOS, this enables support for ARC (automatic ref-counting). |
1717 # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html. | 1706 # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html. |
1718 config("enable_arc") { | 1707 config("enable_arc") { |
1719 common_flags = [ "-fobjc-arc" ] | 1708 common_flags = [ "-fobjc-arc" ] |
1720 cflags_objc = common_flags | 1709 cflags_objc = common_flags |
1721 cflags_objcc = common_flags | 1710 cflags_objcc = common_flags |
1722 } | 1711 } |
1723 } | 1712 } |
OLD | NEW |