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

Unified Diff: build/config/BUILD.gn

Issue 1601893002: Have gn gen assert that the output directory does not have GYP artifacts (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: move to build/config/BUILD.gn 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « .gn ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/config/BUILD.gn
diff --git a/build/config/BUILD.gn b/build/config/BUILD.gn
index 9a3a6b7452a50f09e826f4eba07f96d59115ffde..6132e84a2b5e55a6a07905ecce1f5bebeb1ec3b9 100644
--- a/build/config/BUILD.gn
+++ b/build/config/BUILD.gn
@@ -11,6 +11,14 @@ import("//build/config/sanitizers/sanitizers.gni")
import("//build/config/ui.gni")
import("//build/toolchain/goma.gni")
+# One common error that happens is that GYP-generated headers within gen/ get
+# included rather than the GN-generated ones within gen/ subdirectories.
+# TODO(agrieve): Remove once GYP is gone (as well as exec_script exception).
+assert(
+ exec_script("//build/dir_exists.py", [ "obj.host" ], "string") == "False",
+ "GYP artifacts detected in $root_build_dir.$0x0A" +
+ "You must wipe this directory before building with GN.")
+
declare_args() {
# When set (the default) enables C++ iterator debugging in debug builds.
# Iterator debugging is always off in release builds (technically, this flag
« no previous file with comments | « .gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698