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

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

Issue 2891843002: build: Remove build system support for gold plugin, except under ChromeOS. (Closed)
Patch Set: Only allow gold plugin with ChromeOS Created 3 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 | « 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 452 matching lines...) Expand 10 before | Expand all | Expand 10 after
463 463
464 # Add flags for link-time optimization. These flags enable 464 # Add flags for link-time optimization. These flags enable
465 # optimizations/transformations that require whole-program visibility at link 465 # optimizations/transformations that require whole-program visibility at link
466 # time, so they need to be applied to all translation units, and we may end up 466 # time, so they need to be applied to all translation units, and we may end up
467 # with miscompiles if only part of the program is compiled with LTO flags. For 467 # with miscompiles if only part of the program is compiled with LTO flags. For
468 # that reason, we cannot allow targets to enable or disable these flags, for 468 # that reason, we cannot allow targets to enable or disable these flags, for
469 # example by disabling the optimize configuration. 469 # example by disabling the optimize configuration.
470 # TODO(pcc): Make this conditional on is_official_build rather than on gn 470 # TODO(pcc): Make this conditional on is_official_build rather than on gn
471 # flags for specific features. 471 # flags for specific features.
472 if (!is_debug && (allow_posix_link_time_opt || is_cfi) && !is_nacl) { 472 if (!is_debug && (allow_posix_link_time_opt || is_cfi) && !is_nacl) {
473 assert(use_lld || is_chromeos, "gold plugin only supported with ChromeOS")
474
473 if (use_thin_lto) { 475 if (use_thin_lto) {
474 cflags += [ "-flto=thin" ] 476 cflags += [ "-flto=thin" ]
475 ldflags += [ "-flto=thin" ] 477 ldflags += [ "-flto=thin" ]
476 478
477 # Limit the parallelism to avoid too agressive competition between 479 # Limit the parallelism to avoid too agressive competition between
478 # linker jobs. This is still suboptimal to a potential dynamic 480 # linker jobs. This is still suboptimal to a potential dynamic
479 # resource allocation scheme, but should be good enough. 481 # resource allocation scheme, but should be good enough.
480 if (use_lld) { 482 if (use_lld) {
481 ldflags += [ 483 ldflags += [
482 "-Wl,--thinlto-jobs=8", 484 "-Wl,--thinlto-jobs=8",
(...skipping 1257 matching lines...) Expand 10 before | Expand all | Expand 10 after
1740 1742
1741 if (is_ios || is_mac) { 1743 if (is_ios || is_mac) {
1742 # On Mac and iOS, this enables support for ARC (automatic ref-counting). 1744 # On Mac and iOS, this enables support for ARC (automatic ref-counting).
1743 # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html. 1745 # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html.
1744 config("enable_arc") { 1746 config("enable_arc") {
1745 common_flags = [ "-fobjc-arc" ] 1747 common_flags = [ "-fobjc-arc" ]
1746 cflags_objc = common_flags 1748 cflags_objc = common_flags
1747 cflags_objcc = common_flags 1749 cflags_objcc = common_flags
1748 } 1750 }
1749 } 1751 }
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