| 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 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 286 "-Wl,-z,now", | 286 "-Wl,-z,now", |
| 287 "-Wl,-z,relro", | 287 "-Wl,-z,relro", |
| 288 ] | 288 ] |
| 289 if (!using_sanitizer && !use_cfi_diag) { | 289 if (!using_sanitizer && !use_cfi_diag) { |
| 290 ldflags += [ "-Wl,-z,defs" ] | 290 ldflags += [ "-Wl,-z,defs" ] |
| 291 } | 291 } |
| 292 } | 292 } |
| 293 | 293 |
| 294 # Linux-specific compiler flags setup. | 294 # Linux-specific compiler flags setup. |
| 295 # ------------------------------------ | 295 # ------------------------------------ |
| 296 if (is_posix && use_lld) { | 296 if (is_posix && use_lld && !is_nacl) { |
| 297 ldflags += [ "-fuse-ld=lld" ] | 297 ldflags += [ "-fuse-ld=lld" ] |
| 298 } else if (use_gold) { | 298 } else if (use_gold) { |
| 299 ldflags += [ | 299 ldflags += [ |
| 300 "-B$gold_path", | 300 "-B$gold_path", |
| 301 | 301 |
| 302 # Newer gccs and clangs support -fuse-ld, use the flag to force gold | 302 # Newer gccs and clangs support -fuse-ld, use the flag to force gold |
| 303 # selection. | 303 # selection. |
| 304 # gcc -- http://gcc.gnu.org/onlinedocs/gcc-4.8.0/gcc/Optimize-Options.html | 304 # gcc -- http://gcc.gnu.org/onlinedocs/gcc-4.8.0/gcc/Optimize-Options.html |
| 305 "-fuse-ld=gold", | 305 "-fuse-ld=gold", |
| 306 | 306 |
| (...skipping 17 matching lines...) Expand all Loading... |
| 324 # ldflags += [ | 324 # ldflags += [ |
| 325 # "-Wl,--detect-odr-violations", | 325 # "-Wl,--detect-odr-violations", |
| 326 # ] | 326 # ] |
| 327 #} | 327 #} |
| 328 } else if (linux_use_bundled_binutils) { | 328 } else if (linux_use_bundled_binutils) { |
| 329 # Gold is the default linker for the bundled binutils so we explicitly | 329 # Gold is the default linker for the bundled binutils so we explicitly |
| 330 # enable the bfd linker when use_gold is not set. | 330 # enable the bfd linker when use_gold is not set. |
| 331 ldflags += [ "-fuse-ld=bfd" ] | 331 ldflags += [ "-fuse-ld=bfd" ] |
| 332 } | 332 } |
| 333 | 333 |
| 334 if (is_posix && (use_gold || use_lld) && !using_sanitizer && | 334 if (is_posix && (use_gold || (use_lld && !is_nacl)) && !using_sanitizer && |
| 335 !(is_android && use_order_profiling)) { | 335 !(is_android && use_order_profiling)) { |
| 336 ldflags += [ "-Wl,--icf=all" ] | 336 ldflags += [ "-Wl,--icf=all" ] |
| 337 } | 337 } |
| 338 | 338 |
| 339 if (linux_use_bundled_binutils) { | 339 if (linux_use_bundled_binutils) { |
| 340 cflags += [ "-B$binutils_path" ] | 340 cflags += [ "-B$binutils_path" ] |
| 341 } | 341 } |
| 342 | 342 |
| 343 # Clang-specific compiler flags setup. | 343 # Clang-specific compiler flags setup. |
| 344 # ------------------------------------ | 344 # ------------------------------------ |
| (...skipping 1105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1450 | 1450 |
| 1451 if (is_ios || is_mac) { | 1451 if (is_ios || is_mac) { |
| 1452 # On Mac and iOS, this enables support for ARC (automatic ref-counting). | 1452 # On Mac and iOS, this enables support for ARC (automatic ref-counting). |
| 1453 # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html. | 1453 # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html. |
| 1454 config("enable_arc") { | 1454 config("enable_arc") { |
| 1455 common_flags = [ "-fobjc-arc" ] | 1455 common_flags = [ "-fobjc-arc" ] |
| 1456 cflags_objc = common_flags | 1456 cflags_objc = common_flags |
| 1457 cflags_objcc = common_flags | 1457 cflags_objcc = common_flags |
| 1458 } | 1458 } |
| 1459 } | 1459 } |
| OLD | NEW |