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

Unified Diff: pylib/gyp/common.py

Issue 10833021: Honor $CC/$CC_host and friends in make generator. (Closed) Base URL: http://git.chromium.org/external/gyp.git@master
Patch Set: Remove msvs_emulation.py changes Created 8 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 | « no previous file | pylib/gyp/generator/make.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pylib/gyp/common.py
diff --git a/pylib/gyp/common.py b/pylib/gyp/common.py
index 5b06a9746fb0097b9f0ff366b4e47c521f1632c1..6144d2fe7af90bd9690bb92bc234c0a825f2060a 100644
--- a/pylib/gyp/common.py
+++ b/pylib/gyp/common.py
@@ -95,6 +95,15 @@ def BuildFile(fully_qualified_target):
return ParseQualifiedTarget(fully_qualified_target)[0]
+def GetEnvironFallback(var_list, default):
+ """Look up a key in the environment, with fallback to secondary keys
+ and finally falling back to a default value."""
+ for var in var_list:
+ if var in os.environ:
+ return os.environ[var]
+ return default
+
+
def QualifiedTarget(build_file, target, toolset):
# "Qualified" means the file that a target was defined in and the target
# name, separated by a colon, suffixed by a # and the toolset name:
« no previous file with comments | « no previous file | pylib/gyp/generator/make.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698