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

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

Issue 2953953002: Revert of build: Remove build system support for gold plugin, except under ChromeOS. (Closed)
Patch Set: Created 3 years, 6 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/compiler/compiler.gni » ('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/chromecast_build.gni") 7 import("//build/config/chromecast_build.gni")
8 import("//build/config/compiler/compiler.gni") 8 import("//build/config/compiler/compiler.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 463 matching lines...) Expand 10 before | Expand all | Expand 10 after
474 474
475 # Add flags for link-time optimization. These flags enable 475 # Add flags for link-time optimization. These flags enable
476 # optimizations/transformations that require whole-program visibility at link 476 # optimizations/transformations that require whole-program visibility at link
477 # time, so they need to be applied to all translation units, and we may end up 477 # time, so they need to be applied to all translation units, and we may end up
478 # with miscompiles if only part of the program is compiled with LTO flags. For 478 # with miscompiles if only part of the program is compiled with LTO flags. For
479 # that reason, we cannot allow targets to enable or disable these flags, for 479 # that reason, we cannot allow targets to enable or disable these flags, for
480 # example by disabling the optimize configuration. 480 # example by disabling the optimize configuration.
481 # TODO(pcc): Make this conditional on is_official_build rather than on gn 481 # TODO(pcc): Make this conditional on is_official_build rather than on gn
482 # flags for specific features. 482 # flags for specific features.
483 if (!is_debug && (allow_posix_link_time_opt || is_cfi) && !is_nacl) { 483 if (!is_debug && (allow_posix_link_time_opt || is_cfi) && !is_nacl) {
484 assert(use_lld || is_chromeos, "gold plugin only supported with ChromeOS")
485
486 if (use_thin_lto) { 484 if (use_thin_lto) {
487 cflags += [ "-flto=thin" ] 485 cflags += [ "-flto=thin" ]
488 ldflags += [ "-flto=thin" ] 486 ldflags += [ "-flto=thin" ]
489 487
490 # Limit the parallelism to avoid too agressive competition between 488 # Limit the parallelism to avoid too agressive competition between
491 # linker jobs. This is still suboptimal to a potential dynamic 489 # linker jobs. This is still suboptimal to a potential dynamic
492 # resource allocation scheme, but should be good enough. 490 # resource allocation scheme, but should be good enough.
493 if (use_lld) { 491 if (use_lld) {
494 ldflags += [ 492 ldflags += [
495 "-Wl,--thinlto-jobs=8", 493 "-Wl,--thinlto-jobs=8",
(...skipping 1312 matching lines...) Expand 10 before | Expand all | Expand 10 after
1808 1806
1809 if (is_ios || is_mac) { 1807 if (is_ios || is_mac) {
1810 # On Mac and iOS, this enables support for ARC (automatic ref-counting). 1808 # On Mac and iOS, this enables support for ARC (automatic ref-counting).
1811 # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html. 1809 # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html.
1812 config("enable_arc") { 1810 config("enable_arc") {
1813 common_flags = [ "-fobjc-arc" ] 1811 common_flags = [ "-fobjc-arc" ]
1814 cflags_objc = common_flags 1812 cflags_objc = common_flags
1815 cflags_objcc = common_flags 1813 cflags_objcc = common_flags
1816 } 1814 }
1817 } 1815 }
OLDNEW
« no previous file with comments | « no previous file | build/config/compiler/compiler.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698