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

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

Issue 1556923002: clang: Makes builds with clang less dependent on absolute file path (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Reverting change on OSX and iOS Created 4 years, 11 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/linux/pkg_config.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/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/ccache.gni") 9 import("//build/toolchain/ccache.gni")
10 10
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 if (linux_use_bundled_binutils) { 303 if (linux_use_bundled_binutils) {
304 cflags += [ "-B$binutils_path" ] 304 cflags += [ "-B$binutils_path" ]
305 } 305 }
306 306
307 # Clang-specific compiler flags setup. 307 # Clang-specific compiler flags setup.
308 # ------------------------------------ 308 # ------------------------------------
309 if (is_clang) { 309 if (is_clang) {
310 cflags += [ "-fcolor-diagnostics" ] 310 cflags += [ "-fcolor-diagnostics" ]
311 } 311 }
312 312
313 # Makes builds independent of absolute file path.
314 # Currently disabled for nacl since its toolchain lacks this flag (too old).
315 # TODO(zforman): Once nacl's toolchain is updated, remove check.
316 if (is_clang && !is_nacl) {
317 absolute_path = rebase_path("//.")
318 cflags += [ "-fdebug-prefix-map=$absolute_path=." ]
319 }
320
313 # C++11 compiler flags setup. 321 # C++11 compiler flags setup.
314 # --------------------------- 322 # ---------------------------
315 if (is_linux || is_android || (is_nacl && is_clang)) { 323 if (is_linux || is_android || (is_nacl && is_clang)) {
316 # gnu++11 instead of c++11 is needed because some code uses typeof() (a 324 # gnu++11 instead of c++11 is needed because some code uses typeof() (a
317 # GNU extension). 325 # GNU extension).
318 # TODO(thakis): Eventually switch this to c++11 instead, 326 # TODO(thakis): Eventually switch this to c++11 instead,
319 # http://crbug.com/427584 327 # http://crbug.com/427584
320 cflags_cc += [ "-std=gnu++11" ] 328 cflags_cc += [ "-std=gnu++11" ]
321 } else if (!is_win && !is_nacl) { 329 } else if (!is_win && !is_nacl) {
322 # TODO(mcgrathr) - the NaCl GCC toolchain doesn't support either gnu++11 330 # TODO(mcgrathr) - the NaCl GCC toolchain doesn't support either gnu++11
(...skipping 984 matching lines...) Expand 10 before | Expand all | Expand 10 after
1307 if (symbol_level == 0) { 1315 if (symbol_level == 0) {
1308 configs = [ ":no_symbols" ] 1316 configs = [ ":no_symbols" ]
1309 } else if (symbol_level == 1) { 1317 } else if (symbol_level == 1) {
1310 configs = [ ":minimal_symbols" ] 1318 configs = [ ":minimal_symbols" ]
1311 } else if (symbol_level == 2) { 1319 } else if (symbol_level == 2) {
1312 configs = [ ":symbols" ] 1320 configs = [ ":symbols" ]
1313 } else { 1321 } else {
1314 assert(false) 1322 assert(false)
1315 } 1323 }
1316 } 1324 }
OLDNEW
« no previous file with comments | « no previous file | build/config/linux/pkg_config.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698