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

Unified Diff: tools/gn/value_extractors.cc

Issue 630223002: gn: Support build directories outside the source tree. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updated patch set Created 6 years, 2 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
« tools/gn/source_dir.cc ('K') | « tools/gn/substitution_writer.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/value_extractors.cc
diff --git a/tools/gn/value_extractors.cc b/tools/gn/value_extractors.cc
index 9e6a37edc95c6c27478b0434ddc7f49d6ad9d645..38e18c618d96b4c60d2d76d291539da3bf0bf79d 100644
--- a/tools/gn/value_extractors.cc
+++ b/tools/gn/value_extractors.cc
@@ -58,8 +58,6 @@ bool ListValueUniqueExtractor(const Value& value,
return true;
}
-// This extractor rejects files with system-absolute file paths. If we need
-// that in the future, we'll have to add some flag to control this.
struct RelativeFileConverter {
RelativeFileConverter(const BuildSettings* build_settings_in,
const SourceDir& current_dir_in)
@@ -70,14 +68,7 @@ struct RelativeFileConverter {
if (!v.VerifyTypeIs(Value::STRING, err))
return false;
*out = current_dir.ResolveRelativeFile(v.string_value(),
- build_settings->root_path_utf8());
- if (out->is_system_absolute()) {
- *err = Err(v, "System-absolute file path.",
- "You can't list a system-absolute file path here. Please include "
- "only files in\nthe source tree. Maybe you meant to begin with two "
- "slashes to indicate an\nabsolute path in the source tree?");
- return false;
- }
+ build_settings->root_path());
return true;
}
const BuildSettings* build_settings;
@@ -94,7 +85,7 @@ struct RelativeDirConverter {
if (!v.VerifyTypeIs(Value::STRING, err))
return false;
*out = current_dir.ResolveRelativeDir(v.string_value(),
- build_settings->root_path_utf8());
+ build_settings->root_path());
return true;
}
const BuildSettings* build_settings;
« tools/gn/source_dir.cc ('K') | « tools/gn/substitution_writer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698