| Index: tools/gn/substitution_writer.cc
|
| diff --git a/tools/gn/substitution_writer.cc b/tools/gn/substitution_writer.cc
|
| index 65a1d1fe2859f23388922df978ddb2cab1a71d48..aab01f80d1b0a8b713e7bf550cd8dc0090cc7c68 100644
|
| --- a/tools/gn/substitution_writer.cc
|
| +++ b/tools/gn/substitution_writer.cc
|
| @@ -235,10 +235,6 @@ OutputFile SubstitutionWriter::ApplyPatternToSourceAsOutputFile(
|
| const SubstitutionPattern& pattern,
|
| const SourceFile& source) {
|
| SourceFile result_as_source = ApplyPatternToSource(settings, pattern, source);
|
| - CHECK(result_as_source.is_source_absolute())
|
| - << "The result of the pattern \""
|
| - << pattern.AsString()
|
| - << "\" was not an absolute path beginning in \"//\".";
|
| return OutputFile(settings->build_settings(), result_as_source);
|
| }
|
|
|
| @@ -358,7 +354,8 @@ std::string SubstitutionWriter::GetSourceSubstitution(
|
| if (source.is_system_absolute())
|
| return DirectoryWithNoLastSlash(source.GetDir());
|
| return RebaseSourceAbsolutePath(
|
| - DirectoryWithNoLastSlash(source.GetDir()), SourceDir("//"));
|
| + DirectoryWithNoLastSlash(source.GetDir()), SourceDir("//"),
|
| + settings->build_settings()->root_path());
|
|
|
| case SUBSTITUTION_SOURCE_GEN_DIR:
|
| to_rebase = DirectoryWithNoLastSlash(
|
| @@ -382,7 +379,8 @@ std::string SubstitutionWriter::GetSourceSubstitution(
|
| // extension extraction) will have been handled via early return above.
|
| if (output_style == OUTPUT_ABSOLUTE)
|
| return to_rebase;
|
| - return RebaseSourceAbsolutePath(to_rebase, relative_to);
|
| + return RebaseSourceAbsolutePath(to_rebase, relative_to,
|
| + settings->build_settings()->root_path());
|
| }
|
|
|
| // static
|
|
|