Chromium Code Reviews| 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 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 201 | 201 |
| 202 # The x86 toolchain currently has problems with stack-protector. | 202 # The x86 toolchain currently has problems with stack-protector. |
| 203 if (is_android && current_cpu == "x86") { | 203 if (is_android && current_cpu == "x86") { |
| 204 cflags += [ "-fno-stack-protector" ] | 204 cflags += [ "-fno-stack-protector" ] |
| 205 } else { | 205 } else { |
| 206 cflags += [ "-fstack-protector" ] | 206 cflags += [ "-fstack-protector" ] |
| 207 } | 207 } |
| 208 } | 208 } |
| 209 | 209 |
| 210 # Linker warnings. | 210 # Linker warnings. |
| 211 if ( fatal_linker_warnings && | 211 if (fatal_linker_warnings && !(is_chromeos && current_cpu == "arm") && |
| 212 !(is_chromeos && current_cpu == "arm") && | |
| 213 !(is_android && use_order_profiling) && !is_mac && !is_ios) { | 212 !(is_android && use_order_profiling) && !is_mac && !is_ios) { |
| 214 # TODO(jochen): Enable this on chromeos on arm. http://crbug.com/356580 | 213 # TODO(jochen): Enable this on chromeos on arm. http://crbug.com/356580 |
| 215 # TODO(lizeb,pasko): Fix link errors when linking with order_profiling=1 | 214 # TODO(lizeb,pasko): Fix link errors when linking with order_profiling=1 |
| 216 # crbug.com/485542 | 215 # crbug.com/485542 |
| 217 ldflags += [ "-Wl,--fatal-warnings" ] | 216 ldflags += [ "-Wl,--fatal-warnings" ] |
| 218 } | 217 } |
| 219 } | 218 } |
| 220 | 219 |
| 221 if (is_clang && is_debug) { | 220 if (is_clang && is_debug) { |
| 222 # Allow comparing the address of references and 'this' against 0 | 221 # Allow comparing the address of references and 'this' against 0 |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 313 } | 312 } |
| 314 | 313 |
| 315 # Use -mstackrealign due to a bug on ia32 Jelly Bean. | 314 # Use -mstackrealign due to a bug on ia32 Jelly Bean. |
| 316 # See crbug.com/521527 | 315 # See crbug.com/521527 |
| 317 if (current_cpu == "x86") { | 316 if (current_cpu == "x86") { |
| 318 cflags += [ "-mstackrealign" ] | 317 cflags += [ "-mstackrealign" ] |
| 319 } | 318 } |
| 320 } else { | 319 } else { |
| 321 ldflags += [ | 320 ldflags += [ |
| 322 "-B$gold_path", | 321 "-B$gold_path", |
| 322 | |
| 323 # Experimentation found that using four linking threads | 323 # Experimentation found that using four linking threads |
| 324 # saved ~20% of link time. | 324 # saved ~20% of link time. |
| 325 # https://groups.google.com/a/chromium.org/group/chromium-dev/browse_thr ead/thread/281527606915bb36 | 325 # https://groups.google.com/a/chromium.org/group/chromium-dev/browse_thr ead/thread/281527606915bb36 |
| 326 # Only apply this to the target linker, since the host | 326 # Only apply this to the target linker, since the host |
| 327 # linker might not be gold, but isn't used much anyway. | 327 # linker might not be gold, but isn't used much anyway. |
| 328 # TODO(raymes): Disable threading because gold is frequently | 328 "-Wl,--threads", |
| 329 # crashing on the bots: crbug.com/161942. | 329 "-Wl,--thread-count=4", |
|
Nico
2016/07/04 21:24:58
I think we only want to enable this if we're using
tzik
2016/07/05 04:05:58
I think it wasn't. Added a condition to check linu
| |
| 330 #"-Wl,--threads", | |
| 331 #"-Wl,--thread-count=4", | |
| 332 ] | 330 ] |
| 333 } | 331 } |
| 334 | 332 |
| 335 if (gdb_index) { | 333 if (gdb_index) { |
| 336 ldflags += [ "-Wl,--gdb-index" ] | 334 ldflags += [ "-Wl,--gdb-index" ] |
| 337 } | 335 } |
| 338 | 336 |
| 339 # TODO(thestig): Make this flag work with GN. | 337 # TODO(thestig): Make this flag work with GN. |
| 340 #if (!is_official_build && !is_chromeos && !(is_asan || is_lsan || is_tsan | | is_msan)) { | 338 #if (!is_official_build && !is_chromeos && !(is_asan || is_lsan || is_tsan | | is_msan)) { |
| 341 # ldflags += [ | 339 # ldflags += [ |
| (...skipping 1224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1566 | 1564 |
| 1567 if (is_ios || is_mac) { | 1565 if (is_ios || is_mac) { |
| 1568 # On Mac and iOS, this enables support for ARC (automatic ref-counting). | 1566 # On Mac and iOS, this enables support for ARC (automatic ref-counting). |
| 1569 # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html. | 1567 # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html. |
| 1570 config("enable_arc") { | 1568 config("enable_arc") { |
| 1571 common_flags = [ "-fobjc-arc" ] | 1569 common_flags = [ "-fobjc-arc" ] |
| 1572 cflags_objc = common_flags | 1570 cflags_objc = common_flags |
| 1573 cflags_objcc = common_flags | 1571 cflags_objcc = common_flags |
| 1574 } | 1572 } |
| 1575 } | 1573 } |
| OLD | NEW |