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

Unified 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: Created 4 years, 12 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | build/config/linux/pkg_config.gni » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/config/compiler/BUILD.gn
diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
index 97eb6726ca36455f5b87284c80ecc8c85f8c875e..49d98c1f4ca53f4171bdd9a40867fa2d3504dc55 100644
--- a/build/config/compiler/BUILD.gn
+++ b/build/config/compiler/BUILD.gn
@@ -310,6 +310,14 @@ config("compiler") {
cflags += [ "-fcolor-diagnostics" ]
}
+ # Makes builds independent of absolute file path.
+ # Currently disabled for nacl since its toolchain is old and doesn't have this flag.
+ # TODO(zforman): Once nacl's toolchain is updated, remove check.
+ if (is_clang && !is_nacl) {
+ absolute_path = rebase_path("../../..")
Zachary Forman 2016/01/05 03:21:29 Is there a GN builtin or otherwise that allows us
Nico 2016/01/05 12:22:48 ^ brettw
brettw 2016/01/05 19:10:11 I think you can do: rebase_path("//.") The thing
Zachary Forman 2016/01/06 23:20:49 This worked - thanks!
+ cflags += [ "-fdebug-prefix-map=$absolute_path=." ]
+ }
+
# C++11 compiler flags setup.
# ---------------------------
if (is_linux || is_android || (is_nacl && is_clang)) {
« 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