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

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

Issue 1947103002: Fix LTO on Linux by not specifying a blacklist. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: gyp Created 4 years, 7 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 | « build/common.gypi ('k') | no next file » | 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 427 matching lines...) Expand 10 before | Expand all | Expand 10 after
438 # Allows the linker to apply ICF to the LTO object file. Also, when 438 # Allows the linker to apply ICF to the LTO object file. Also, when
439 # targeting ARM, without this flag, LTO produces a .text section that is 439 # targeting ARM, without this flag, LTO produces a .text section that is
440 # larger than the maximum call displacement, preventing the linker from 440 # larger than the maximum call displacement, preventing the linker from
441 # relocating calls (http://llvm.org/PR22999). 441 # relocating calls (http://llvm.org/PR22999).
442 if (is_linux) { 442 if (is_linux) {
443 ldflags += [ "-Wl,-plugin-opt,-function-sections" ] 443 ldflags += [ "-Wl,-plugin-opt,-function-sections" ]
444 } 444 }
445 445
446 # TODO(pcc): Make these flags work correctly with CFI. 446 # TODO(pcc): Make these flags work correctly with CFI.
447 if (!is_cfi) { 447 if (!is_cfi) {
448 cflags += [ 448 cflags += [ "-fwhole-program-vtables" ]
449 "-fwhole-program-vtables",
450
451 # TODO(pcc): Remove this flag once the upstream interface change
452 # (http://reviews.llvm.org/D18635) lands.
453 "-fwhole-program-vtables-blacklist=" +
454 rebase_path("//tools/cfi/blacklist.txt", root_build_dir),
455 ]
456 ldflags += [ "-fwhole-program-vtables" ] 449 ldflags += [ "-fwhole-program-vtables" ]
457 } 450 }
458 } 451 }
459 452
460 # Pass the same C/C++ flags to the objective C/C++ compiler. 453 # Pass the same C/C++ flags to the objective C/C++ compiler.
461 cflags_objc += cflags_c 454 cflags_objc += cflags_c
462 cflags_objcc += cflags_cc 455 cflags_objcc += cflags_cc
463 456
464 # Assign any flags set for the C compiler to asmflags so that they are sent 457 # Assign any flags set for the C compiler to asmflags so that they are sent
465 # to the assembler. The Windows assembler takes different types of flags 458 # to the assembler. The Windows assembler takes different types of flags
(...skipping 990 matching lines...) Expand 10 before | Expand all | Expand 10 after
1456 1449
1457 if (is_ios || is_mac) { 1450 if (is_ios || is_mac) {
1458 # On Mac and iOS, this enables support for ARC (automatic ref-counting). 1451 # On Mac and iOS, this enables support for ARC (automatic ref-counting).
1459 # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html. 1452 # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html.
1460 config("enable_arc") { 1453 config("enable_arc") {
1461 common_flags = [ "-fobjc-arc" ] 1454 common_flags = [ "-fobjc-arc" ]
1462 cflags_objc = common_flags 1455 cflags_objc = common_flags
1463 cflags_objcc = common_flags 1456 cflags_objcc = common_flags
1464 } 1457 }
1465 } 1458 }
OLDNEW
« no previous file with comments | « build/common.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698