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

Unified Diff: trunk/src/tools/gn/ninja_helper.cc

Issue 46313006: Revert 232657 "GN: toolchain threading cleanup" (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 1 month 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 | « trunk/src/tools/gn/ninja_helper.h ('k') | trunk/src/tools/gn/ninja_helper_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/src/tools/gn/ninja_helper.cc
===================================================================
--- trunk/src/tools/gn/ninja_helper.cc (revision 232660)
+++ trunk/src/tools/gn/ninja_helper.cc (working copy)
@@ -189,20 +189,23 @@
return ret;
}
-std::string NinjaHelper::GetRulePrefix(const Settings* settings) const {
- // Don't prefix the default toolchain so it looks prettier, prefix everything
- // else.
- if (settings->is_default())
- return std::string(); // Default toolchain has no prefix.
- return settings->toolchain_label().name() + "_";
+std::string NinjaHelper::GetRulePrefix(const Toolchain* toolchain) const {
+ // This code doesn't prefix the default toolchain commands. This is disabled
+ // so we can coexist with GYP's commands (which aren't prefixed). If we don't
+ // need to coexist with GYP anymore, we can uncomment this to make things a
+ // bit prettier.
+ //if (toolchain->is_default())
+ // return std::string(); // Default toolchain has no prefix.
+ return toolchain->label().name() + "_";
}
std::string NinjaHelper::GetRuleForSourceType(const Settings* settings,
+ const Toolchain* toolchain,
SourceFileType type) const {
// This function may be hot since it will be called for every source file
// in the tree. We could cache the results to avoid making a string for
// every invocation.
- std::string prefix = GetRulePrefix(settings);
+ std::string prefix = GetRulePrefix(toolchain);
if (type == SOURCE_C)
return prefix + "cc";
« no previous file with comments | « trunk/src/tools/gn/ninja_helper.h ('k') | trunk/src/tools/gn/ninja_helper_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698