summaryrefslogtreecommitdiffstats
path: root/tools/gn/toolchain.cc
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-09-23 23:12:58 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-09-23 23:12:58 +0000
commitc9f0540e4207ddd1a462b9e76ddcfe13e3b75b9a (patch)
tree094c3e45b41478dbeb1145c246fa436cda5a40ba /tools/gn/toolchain.cc
parent7791cf4320968b5d1fde781626dbbf0cf96b8ab5 (diff)
downloadchromium_src-c9f0540e4207ddd1a462b9e76ddcfe13e3b75b9a.zip
chromium_src-c9f0540e4207ddd1a462b9e76ddcfe13e3b75b9a.tar.gz
chromium_src-c9f0540e4207ddd1a462b9e76ddcfe13e3b75b9a.tar.bz2
Fix GN on Windows build and tests.
This adds some logic to find python.exe inside your depot tools. This won't work 100% of the time, but should work for 99% of them. In real life we'll probably have gn in depot_tools and it won't matter. This adds some canonicalization for slashes for some of the unit tests. I'm not sure if this is the best way to run them so I didn't make a helper function. I'm wondering if the slashes should always key off of the build type rather than the current OS type, so an is_win build will always get backslashes. I may work on this next. Fixes copy rules (needed a prefix) Updates some build files that had regressed. Add RC toolchain rule for Windows. BUG= R=scottmg@chromium.org Review URL: https://codereview.chromium.org/24363004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@224827 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools/gn/toolchain.cc')
-rw-r--r--tools/gn/toolchain.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/gn/toolchain.cc b/tools/gn/toolchain.cc
index cf9bfdb..887fba2 100644
--- a/tools/gn/toolchain.cc
+++ b/tools/gn/toolchain.cc
@@ -11,6 +11,7 @@ const char* Toolchain::kToolCc = "cc";
const char* Toolchain::kToolCxx = "cxx";
const char* Toolchain::kToolObjC = "objc";
const char* Toolchain::kToolObjCxx = "objcxx";
+const char* Toolchain::kToolRc = "rc";
const char* Toolchain::kToolAsm = "asm";
const char* Toolchain::kToolAlink = "alink";
const char* Toolchain::kToolSolink = "solink";
@@ -44,6 +45,7 @@ Toolchain::ToolType Toolchain::ToolNameToType(const base::StringPiece& str) {
if (str == kToolCxx) return TYPE_CXX;
if (str == kToolObjC) return TYPE_OBJC;
if (str == kToolObjCxx) return TYPE_OBJCXX;
+ if (str == kToolRc) return TYPE_RC;
if (str == kToolAsm) return TYPE_ASM;
if (str == kToolAlink) return TYPE_ALINK;
if (str == kToolSolink) return TYPE_SOLINK;
@@ -60,6 +62,7 @@ std::string Toolchain::ToolTypeToName(ToolType type) {
case TYPE_CXX: return kToolCxx;
case TYPE_OBJC: return kToolObjC;
case TYPE_OBJCXX: return kToolObjCxx;
+ case TYPE_RC: return kToolRc;
case TYPE_ASM: return kToolAsm;
case TYPE_ALINK: return kToolAlink;
case TYPE_SOLINK: return kToolSolink;