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 413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
424 } | 424 } |
425 | 425 |
426 # Allows the linker to apply ICF to the LTO object file. Also, when | 426 # Allows the linker to apply ICF to the LTO object file. Also, when |
427 # targeting ARM, without this flag, LTO produces a .text section that is | 427 # targeting ARM, without this flag, LTO produces a .text section that is |
428 # larger than the maximum call displacement, preventing the linker from | 428 # larger than the maximum call displacement, preventing the linker from |
429 # relocating calls (http://llvm.org/PR22999). | 429 # relocating calls (http://llvm.org/PR22999). |
430 if (is_linux) { | 430 if (is_linux) { |
431 ldflags += [ "-Wl,-plugin-opt,-function-sections" ] | 431 ldflags += [ "-Wl,-plugin-opt,-function-sections" ] |
432 } | 432 } |
433 | 433 |
434 arflags = [ | |
435 "--plugin", | |
436 rebase_path("//third_party/llvm-build/Release+Asserts/lib/LLVMgold.so", | |
437 root_build_dir), | |
438 ] | |
439 | |
440 # TODO(pcc): Make these flags work correctly with CFI. | 434 # TODO(pcc): Make these flags work correctly with CFI. |
441 if (!is_cfi) { | 435 if (!is_cfi) { |
442 cflags += [ | 436 cflags += [ |
443 "-fwhole-program-vtables", | 437 "-fwhole-program-vtables", |
444 | 438 |
445 # TODO(pcc): Remove this flag once the upstream interface change | 439 # TODO(pcc): Remove this flag once the upstream interface change |
446 # (http://reviews.llvm.org/D18635) lands. | 440 # (http://reviews.llvm.org/D18635) lands. |
447 "-fwhole-program-vtables-blacklist=" + | 441 "-fwhole-program-vtables-blacklist=" + |
448 rebase_path("//tools/cfi/blacklist.txt", root_build_dir), | 442 rebase_path("//tools/cfi/blacklist.txt", root_build_dir), |
449 ] | 443 ] |
(...skipping 983 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1433 | 1427 |
1434 if (is_ios || is_mac) { | 1428 if (is_ios || is_mac) { |
1435 # On Mac and iOS, this enables support for ARC (automatic ref-counting). | 1429 # On Mac and iOS, this enables support for ARC (automatic ref-counting). |
1436 # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html. | 1430 # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html. |
1437 config("enable_arc") { | 1431 config("enable_arc") { |
1438 common_flags = [ "-fobjc-arc" ] | 1432 common_flags = [ "-fobjc-arc" ] |
1439 cflags_objc = common_flags | 1433 cflags_objc = common_flags |
1440 cflags_objcc = common_flags | 1434 cflags_objcc = common_flags |
1441 } | 1435 } |
1442 } | 1436 } |
OLD | NEW |