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

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

Issue 1896163003: Implement arflags in the GN build. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@arflags
Patch Set: merge Created 4 years, 8 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/win/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/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
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
434 # TODO(pcc): Make these flags work correctly with CFI. 440 # TODO(pcc): Make these flags work correctly with CFI.
435 if (!is_cfi) { 441 if (!is_cfi) {
436 cflags += [ 442 cflags += [
437 "-fwhole-program-vtables", 443 "-fwhole-program-vtables",
438 444
439 # TODO(pcc): Remove this flag once the upstream interface change 445 # TODO(pcc): Remove this flag once the upstream interface change
440 # (http://reviews.llvm.org/D18635) lands. 446 # (http://reviews.llvm.org/D18635) lands.
441 "-fwhole-program-vtables-blacklist=" + 447 "-fwhole-program-vtables-blacklist=" +
442 rebase_path("//tools/cfi/blacklist.txt", root_build_dir), 448 rebase_path("//tools/cfi/blacklist.txt", root_build_dir),
443 ] 449 ]
(...skipping 983 matching lines...) Expand 10 before | Expand all | Expand 10 after
1427 1433
1428 if (is_ios || is_mac) { 1434 if (is_ios || is_mac) {
1429 # On Mac and iOS, this enables support for ARC (automatic ref-counting). 1435 # On Mac and iOS, this enables support for ARC (automatic ref-counting).
1430 # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html. 1436 # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html.
1431 config("enable_arc") { 1437 config("enable_arc") {
1432 common_flags = [ "-fobjc-arc" ] 1438 common_flags = [ "-fobjc-arc" ]
1433 cflags_objc = common_flags 1439 cflags_objc = common_flags
1434 cflags_objcc = common_flags 1440 cflags_objcc = common_flags
1435 } 1441 }
1436 } 1442 }
OLDNEW
« no previous file with comments | « no previous file | build/config/win/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698