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

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

Issue 2690943007: Move stripping of debug symbols on linux behind a flag (Closed)
Patch Set: 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 | 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 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 if (is_clang && is_linux) {
97 strip_absolute_paths_from_debug_symbols = false
brettw 2017/02/15 22:48:56 Can you add a comment above this (inside the condi
98 }
95 } 99 }
96 100
97 if (is_clang && !is_nacl) { 101 if (is_clang && !is_nacl) {
98 update_args = [ "--print-revision" ] 102 update_args = [ "--print-revision" ]
99 if (llvm_force_head_revision) { 103 if (llvm_force_head_revision) {
100 update_args += [ "--llvm-force-head-revision" ] 104 update_args += [ "--llvm-force-head-revision" ]
101 } 105 }
102 clang_revision = 106 clang_revision =
103 exec_script("//tools/clang/scripts/update.py", update_args, "trim string") 107 exec_script("//tools/clang/scripts/update.py", update_args, "trim string")
104 } 108 }
(...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 422 # 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. 423 # Windows developers rely on it (crbug.com/636109) so only do this on Windows.
420 if (is_clang && is_win) { 424 if (is_clang && is_win) {
421 cflags += [ "-fdiagnostics-absolute-paths" ] 425 cflags += [ "-fdiagnostics-absolute-paths" ]
422 } 426 }
423 427
424 # Makes builds independent of absolute file path. 428 # Makes builds independent of absolute file path.
425 # clang-cl (used if is_win) doesn't expose this flag. 429 # clang-cl (used if is_win) doesn't expose this flag.
426 # Currently disabled for nacl since its toolchain lacks this flag (too old). 430 # Currently disabled for nacl since its toolchain lacks this flag (too old).
427 # TODO(zforman): Once nacl's toolchain is updated, remove check. 431 # TODO(zforman): Once nacl's toolchain is updated, remove check.
428 if (is_clang && is_linux) { 432 if (is_clang && is_linux && strip_absolute_paths_from_debug_symbols) {
429 absolute_path = rebase_path("//.") 433 absolute_path = rebase_path("//.")
430 cflags += [ "-fdebug-prefix-map=$absolute_path=." ] 434 cflags += [ "-fdebug-prefix-map=$absolute_path=." ]
431 } 435 }
432 436
433 # C++11 compiler flags setup. 437 # C++11 compiler flags setup.
434 # --------------------------- 438 # ---------------------------
435 if (is_linux || is_android || (is_nacl && is_clang)) { 439 if (is_linux || is_android || (is_nacl && is_clang)) {
436 # gnu++11 instead of c++11 is needed because some code uses typeof() (a 440 # gnu++11 instead of c++11 is needed because some code uses typeof() (a
437 # GNU extension). 441 # GNU extension).
438 # TODO(thakis): Eventually switch this to c++11 instead, 442 # TODO(thakis): Eventually switch this to c++11 instead,
(...skipping 1259 matching lines...) Expand 10 before | Expand all | Expand 10 after
1698 1702
1699 if (is_ios || is_mac) { 1703 if (is_ios || is_mac) {
1700 # On Mac and iOS, this enables support for ARC (automatic ref-counting). 1704 # On Mac and iOS, this enables support for ARC (automatic ref-counting).
1701 # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html. 1705 # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html.
1702 config("enable_arc") { 1706 config("enable_arc") {
1703 common_flags = [ "-fobjc-arc" ] 1707 common_flags = [ "-fobjc-arc" ]
1704 cflags_objc = common_flags 1708 cflags_objc = common_flags
1705 cflags_objcc = common_flags 1709 cflags_objcc = common_flags
1706 } 1710 }
1707 } 1711 }
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