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

Unified Diff: BUILD.gn

Issue 1739603002: Move GN directory name assert into //BUILD.gn (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | build/config/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: BUILD.gn
diff --git a/BUILD.gn b/BUILD.gn
index ae90772b3fbc82eae2182778499e94081709d12d..cf1bc4c0d40fe7b2aec88b74085093df4b164285 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -26,6 +26,21 @@ declare_args() {
root_extra_deps = []
}
+# Because of the source assignment filter, many targets end up over-filtering
brettw 2016/02/25 22:30:13 Can you put this at the bottom so the file is more
agrieve 2016/02/26 21:14:41 Moved to the bottom, but found out that setting an
+# their sources if the output directory contains a platform name. Assert that
+# this doesn't happen. http://crbug.com/548283
+template("assert_valid_out_dir") {
+ assert(target_name != "") # Mark as used.
+ assert(
+ invoker.sources == invoker.actual_sources,
+ "Do not use a platform name in your output directory (found \"$root_build_dir\"). http://crbug.com/548283")
+}
+
+assert_valid_out_dir("_check_output_dir_has_no_platform_name") {
+ actual_sources = [ "$root_build_dir/foo" ]
+ sources = actual_sources
+}
+
# This file defines the following five main targets:
#
# "both_gn_and_gyp" should list every root target (target that nothing else
« no previous file with comments | « no previous file | build/config/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698