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

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

Issue 2153223002: GN: Use icf=all instead of icf=safe (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: cros only Created 4 years, 5 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 | 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 339 matching lines...) Expand 10 before | Expand all | Expand 10 after
350 (current_cpu == "mipsel" || current_cpu == "mips64el")) { 350 (current_cpu == "mipsel" || current_cpu == "mips64el")) {
351 # Let clang find the ld.bfd in the NDK. 351 # Let clang find the ld.bfd in the NDK.
352 _rebased_android_toolchain_root = 352 _rebased_android_toolchain_root =
353 rebase_path(android_toolchain_root, root_build_dir) 353 rebase_path(android_toolchain_root, root_build_dir)
354 ldflags += [ "--gcc-toolchain=$_rebased_android_toolchain_root" ] 354 ldflags += [ "--gcc-toolchain=$_rebased_android_toolchain_root" ]
355 } 355 }
356 356
357 if (is_posix && (use_gold || (use_lld && !is_nacl)) && !using_sanitizer && 357 if (is_posix && (use_gold || (use_lld && !is_nacl)) && !using_sanitizer &&
358 !(is_android && use_order_profiling)) { 358 !(is_android && use_order_profiling)) {
359 # TODO(crbug.com/576197) - gcc on x86 platforms + gold + icf=all 359 # TODO(crbug.com/576197) - gcc on x86 platforms + gold + icf=all
360 # doesn't currently work. Once it does, use icf=all everywhere. 360 # doesn't currently work on non-chromeos platforms.
361 # Additionally, on Android x86 --icf=safe seems to cause issues as well. 361 # Additionally, on Android x86 --icf=safe seems to cause issues as well.
362 # Additionally, on cast Android x86, --icf=all causes issues. 362 # Additionally, on cast Android x86, --icf=all causes issues.
363 if (is_android && current_cpu == "x86") { 363 if (is_android && current_cpu == "x86") {
364 ldflags += [ "-Wl,--icf=none" ] 364 ldflags += [ "-Wl,--icf=none" ]
365 } else if (is_clang || (current_cpu != "x86" && current_cpu != "x64")) { 365 } else if (is_clang || is_chromeos ||
366 (current_cpu != "x86" && current_cpu != "x64")) {
366 ldflags += [ "-Wl,--icf=all" ] 367 ldflags += [ "-Wl,--icf=all" ]
367 } else if (!is_android) { 368 } else if (!is_android) {
368 ldflags += [ "-Wl,--icf=safe" ] 369 ldflags += [ "-Wl,--icf=safe" ]
369 } 370 }
370 } 371 }
371 372
372 if (linux_use_bundled_binutils) { 373 if (linux_use_bundled_binutils) {
373 cflags += [ "-B$binutils_path" ] 374 cflags += [ "-B$binutils_path" ]
374 } 375 }
375 376
(...skipping 1190 matching lines...) Expand 10 before | Expand all | Expand 10 after
1566 1567
1567 if (is_ios || is_mac) { 1568 if (is_ios || is_mac) {
1568 # On Mac and iOS, this enables support for ARC (automatic ref-counting). 1569 # On Mac and iOS, this enables support for ARC (automatic ref-counting).
1569 # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html. 1570 # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html.
1570 config("enable_arc") { 1571 config("enable_arc") {
1571 common_flags = [ "-fobjc-arc" ] 1572 common_flags = [ "-fobjc-arc" ]
1572 cflags_objc = common_flags 1573 cflags_objc = common_flags
1573 cflags_objcc = common_flags 1574 cflags_objcc = common_flags
1574 } 1575 }
1575 } 1576 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698