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

Unified Diff: tools/gn/substitution_writer.cc

Issue 2198433004: Make get_label_info take into account the toolchain for target_gen_dir (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove unused static function Created 4 years, 4 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 | « tools/gn/scope_per_file_provider.cc ('k') | tools/gn/target.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/substitution_writer.cc
diff --git a/tools/gn/substitution_writer.cc b/tools/gn/substitution_writer.cc
index a82e7ee2e753206b1e6c81b29e7728c0f5c0e21d..ce574856c7aaf123dde1869920a2670f0d89c698 100644
--- a/tools/gn/substitution_writer.cc
+++ b/tools/gn/substitution_writer.cc
@@ -364,13 +364,13 @@ std::string SubstitutionWriter::GetSourceSubstitution(
settings->build_settings()->root_path_utf8());
case SUBSTITUTION_SOURCE_GEN_DIR:
- to_rebase = DirectoryWithNoLastSlash(
- GetGenDirForSourceDir(settings, source.GetDir()));
+ to_rebase = DirectoryWithNoLastSlash(GetSubBuildDirAsSourceDir(
+ BuildDirContext(settings), source.GetDir(), BuildDirType::GEN));
break;
case SUBSTITUTION_SOURCE_OUT_DIR:
- to_rebase = DirectoryWithNoLastSlash(
- GetOutputDirForSourceDir(settings, source.GetDir()));
+ to_rebase = DirectoryWithNoLastSlash(GetSubBuildDirAsSourceDir(
+ BuildDirContext(settings), source.GetDir(), BuildDirType::OBJ));
break;
default:
@@ -433,7 +433,8 @@ bool SubstitutionWriter::GetTargetSubstitution(
break;
case SUBSTITUTION_ROOT_GEN_DIR:
SetDirOrDotWithNoSlash(
- GetToolchainGenDirAsOutputFile(target->settings()).value(),
+ GetBuildDirAsOutputFile(BuildDirContext(target),
+ BuildDirType::GEN).value(),
result);
break;
case SUBSTITUTION_ROOT_OUT_DIR:
@@ -443,12 +444,12 @@ bool SubstitutionWriter::GetTargetSubstitution(
break;
case SUBSTITUTION_TARGET_GEN_DIR:
SetDirOrDotWithNoSlash(
- GetTargetGenDirAsOutputFile(target).value(),
+ GetBuildDirForTargetAsOutputFile(target, BuildDirType::GEN).value(),
result);
break;
case SUBSTITUTION_TARGET_OUT_DIR:
SetDirOrDotWithNoSlash(
- GetTargetOutputDirAsOutputFile(target).value(),
+ GetBuildDirForTargetAsOutputFile(target, BuildDirType::OBJ).value(),
result);
break;
case SUBSTITUTION_TARGET_OUTPUT_NAME:
« no previous file with comments | « tools/gn/scope_per_file_provider.cc ('k') | tools/gn/target.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698