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

Unified Diff: build/config/compiler/BUILD.gn

Issue 1141793003: Update from https://crrev.com/329939 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 7 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 | « build/config/android/rules.gni ('k') | build/config/features.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 ad947050cc52f88c4b1ea2e465d326ba03d22364..0e28e7da8be6dce3e5b5d93500416c894b8513cd 100644
--- a/build/config/compiler/BUILD.gn
+++ b/build/config/compiler/BUILD.gn
@@ -158,15 +158,15 @@ config("compiler") {
]
}
- if (is_clang && !is_win && !is_nacl) {
+ if (is_clang && !is_nacl) {
# This is here so that all files get recompiled after a clang roll and
# when turning clang on or off. (defines are passed via the command line,
# and build system rebuild things when their commandline changes). Nothing
# should ever read this define.
- defines += [ "CR_CLANG_REVISION=" +
- exec_script("//tools/clang/scripts/posix-print-revision.py",
- [],
- "trim string") ]
+ defines +=
+ [ "CR_CLANG_REVISION=" + exec_script("//tools/clang/scripts/update.py",
+ [ "--print-revision" ],
+ "trim string") ]
}
# Mac-specific compiler flags setup.
@@ -336,6 +336,7 @@ config("compiler") {
"-fno-unwind-tables",
"-fno-asynchronous-unwind-tables",
]
+ defines += [ "NO_UNWIND_TABLES" ]
} else {
cflags += [ "-funwind-tables" ]
}
@@ -636,6 +637,18 @@ config("chromium_code") {
"__STDC_CONSTANT_MACROS",
"__STDC_FORMAT_MACROS",
]
+
+ if (using_sanitizer) {
+ # _FORTIFY_SOURCE isn't really supported by Clang now, see
+ # http://llvm.org/bugs/show_bug.cgi?id=16821.
+ # It seems to work fine with Ubuntu 12 headers though, so use it in
+ # official builds.
+ #
+ # Non-chromium code is not guaranteed to compile cleanly with
+ # _FORTIFY_SOURCE. Also, fortified build may fail when optimizations are
+ # disabled, so only do that for Release build.
+ defines += [ "_FORTIFY_SOURCE=2" ]
+ }
}
}
config("no_chromium_code") {
« no previous file with comments | « build/config/android/rules.gni ('k') | build/config/features.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698