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

Unified Diff: tools/gn/function_get_label_info.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: . Created 4 years, 5 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
Index: tools/gn/function_get_label_info.cc
diff --git a/tools/gn/function_get_label_info.cc b/tools/gn/function_get_label_info.cc
index be22cca2ffb182e314561b384ddc833451c7eed7..02478ca4a66d02f5c960a1cc5921a71c1ccd18bd 100644
--- a/tools/gn/function_get_label_info.cc
+++ b/tools/gn/function_get_label_info.cc
@@ -117,29 +117,25 @@ Value RunGetLabelInfo(Scope* scope,
result.string_value() = DirectoryWithNoLastSlash(label.dir());
} else if (what == "target_gen_dir") {
- result.string_value() = DirectoryWithNoLastSlash(
- GetGenDirForSourceDir(scope->settings(), label.dir()));
+ result.string_value() = DirectoryWithNoLastSlash(GetSubBuildDirAsSourceDir(
+ BuildDirContext(scope, label.GetToolchainLabel()),
brettw 2016/08/01 21:53:54 This is the actual bugfix.
+ label.dir(),
+ BuildDirType::GEN));
} else if (what == "root_gen_dir") {
- Label toolchain_label = label.GetToolchainLabel();
- result.string_value() = DirectoryWithNoLastSlash(
- GetToolchainGenDir(scope->settings()->build_settings(),
- toolchain_label,
- ToolchainIsDefault(scope, toolchain_label)));
+ result.string_value() = DirectoryWithNoLastSlash(GetBuildDirAsSourceDir(
+ BuildDirContext(scope, label.GetToolchainLabel()), BuildDirType::GEN));
} else if (what == "target_out_dir") {
- Label toolchain_label = label.GetToolchainLabel();
- result.string_value() = DirectoryWithNoLastSlash(
- GetOutputDirForSourceDir(scope->settings()->build_settings(),
- label.dir(), toolchain_label,
- ToolchainIsDefault(scope, toolchain_label)));
+ result.string_value() = DirectoryWithNoLastSlash(GetSubBuildDirAsSourceDir(
+ BuildDirContext(scope, label.GetToolchainLabel()),
+ label.dir(),
+ BuildDirType::OBJ));
} else if (what == "root_out_dir") {
- Label toolchain_label = label.GetToolchainLabel();
- result.string_value() = DirectoryWithNoLastSlash(
- GetToolchainOutputDir(scope->settings()->build_settings(),
- toolchain_label,
- ToolchainIsDefault(scope, toolchain_label)));
+ result.string_value() = DirectoryWithNoLastSlash(GetBuildDirAsSourceDir(
+ BuildDirContext(scope, label.GetToolchainLabel()),
+ BuildDirType::TOOLCHAIN_ROOT));
} else if (what == "toolchain") {
result.string_value() = label.GetToolchainLabel().GetUserVisibleName(false);

Powered by Google App Engine
This is Rietveld 408576698