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 |