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

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

Issue 2690943007: Move stripping of debug symbols on linux behind a flag (Closed)
Patch Set: updates Created 3 years, 10 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 | tools/mb/mb_config.pyl » ('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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 85
86 # AFDO (Automatic Feedback Directed Optimizer) is a form of profile-guided 86 # AFDO (Automatic Feedback Directed Optimizer) is a form of profile-guided
87 # optimization that GCC supports. It used by ChromeOS in their official 87 # optimization that GCC supports. It used by ChromeOS in their official
88 # builds. To use it, set auto_profile_path to the path to a file containing 88 # builds. To use it, set auto_profile_path to the path to a file containing
89 # the needed gcov profiling data. 89 # the needed gcov profiling data.
90 auto_profile_path = "" 90 auto_profile_path = ""
91 91
92 # Optimize for coverage guided fuzzing (balance between speed and number of 92 # Optimize for coverage guided fuzzing (balance between speed and number of
93 # branches) 93 # branches)
94 optimize_for_fuzzing = false 94 optimize_for_fuzzing = false
95
96 # Optimize symbol files for maximizing goma cache hit rate.
97 strip_absolute_paths_from_debug_symbols = false
95 } 98 }
96 99
97 if (is_clang && !is_nacl) { 100 if (is_clang && !is_nacl) {
98 update_args = [ "--print-revision" ] 101 update_args = [ "--print-revision" ]
99 if (llvm_force_head_revision) { 102 if (llvm_force_head_revision) {
100 update_args += [ "--llvm-force-head-revision" ] 103 update_args += [ "--llvm-force-head-revision" ]
101 } 104 }
102 clang_revision = 105 clang_revision =
103 exec_script("//tools/clang/scripts/update.py", update_args, "trim string") 106 exec_script("//tools/clang/scripts/update.py", update_args, "trim string")
104 } 107 }
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after
418 # on Linux/Mac (GCC doesn't support it), but MSVC does this with /FC and 421 # on Linux/Mac (GCC doesn't support it), but MSVC does this with /FC and
419 # Windows developers rely on it (crbug.com/636109) so only do this on Windows. 422 # Windows developers rely on it (crbug.com/636109) so only do this on Windows.
420 if (is_clang && is_win) { 423 if (is_clang && is_win) {
421 cflags += [ "-fdiagnostics-absolute-paths" ] 424 cflags += [ "-fdiagnostics-absolute-paths" ]
422 } 425 }
423 426
424 # Makes builds independent of absolute file path. 427 # Makes builds independent of absolute file path.
425 # clang-cl (used if is_win) doesn't expose this flag. 428 # clang-cl (used if is_win) doesn't expose this flag.
426 # Currently disabled for nacl since its toolchain lacks this flag (too old). 429 # Currently disabled for nacl since its toolchain lacks this flag (too old).
427 # TODO(zforman): Once nacl's toolchain is updated, remove check. 430 # TODO(zforman): Once nacl's toolchain is updated, remove check.
428 if (is_clang && is_linux) { 431 if (is_clang && is_linux && strip_absolute_paths_from_debug_symbols) {
429 absolute_path = rebase_path("//.") 432 absolute_path = rebase_path("//.")
430 cflags += [ "-fdebug-prefix-map=$absolute_path=." ] 433 cflags += [ "-fdebug-prefix-map=$absolute_path=." ]
431 } 434 }
432 435
433 # C++11 compiler flags setup. 436 # C++11 compiler flags setup.
434 # --------------------------- 437 # ---------------------------
435 if (is_linux || is_android || (is_nacl && is_clang)) { 438 if (is_linux || is_android || (is_nacl && is_clang)) {
436 # gnu++11 instead of c++11 is needed because some code uses typeof() (a 439 # gnu++11 instead of c++11 is needed because some code uses typeof() (a
437 # GNU extension). 440 # GNU extension).
438 # TODO(thakis): Eventually switch this to c++11 instead, 441 # TODO(thakis): Eventually switch this to c++11 instead,
(...skipping 1259 matching lines...) Expand 10 before | Expand all | Expand 10 after
1698 1701
1699 if (is_ios || is_mac) { 1702 if (is_ios || is_mac) {
1700 # On Mac and iOS, this enables support for ARC (automatic ref-counting). 1703 # On Mac and iOS, this enables support for ARC (automatic ref-counting).
1701 # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html. 1704 # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html.
1702 config("enable_arc") { 1705 config("enable_arc") {
1703 common_flags = [ "-fobjc-arc" ] 1706 common_flags = [ "-fobjc-arc" ]
1704 cflags_objc = common_flags 1707 cflags_objc = common_flags
1705 cflags_objcc = common_flags 1708 cflags_objcc = common_flags
1706 } 1709 }
1707 } 1710 }
OLDNEW
« no previous file with comments | « no previous file | tools/mb/mb_config.pyl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698