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

Unified Diff: pylib/gyp/generator/make.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 docstring cleanups (better to commit seperately) Created 8 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
« no previous file with comments | « no previous file | test/compiler-override/compiler.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pylib/gyp/generator/make.py
diff --git a/pylib/gyp/generator/make.py b/pylib/gyp/generator/make.py
index 2954cae64eb3e223c43c3aa18afb199c177d2934..c9305d5489addd751888aae46c4f87a8c1954992 100644
--- a/pylib/gyp/generator/make.py
+++ b/pylib/gyp/generator/make.py
@@ -60,7 +60,6 @@ generator_extra_sources_for_rules = []
def CalculateVariables(default_variables, params):
"""Calculate additional variables for use in the build (called by gyp)."""
- cc_target = os.environ.get('CC.target', os.environ.get('CC', 'cc'))
flavor = gyp.common.GetFlavor(params)
if flavor == 'mac':
default_variables.setdefault('OS', 'mac')
@@ -255,11 +254,11 @@ all_deps :=
# This will allow make to invoke N linker processes as specified in -jN.
LINK ?= %(flock)s $(builddir)/linker.lock $(CXX)
-CC.target ?= $(CC)
+CC.target ?= %(CC.target)s
CFLAGS.target ?= $(CFLAGS)
-CXX.target ?= $(CXX)
+CXX.target ?= %(CXX.target)s
CXXFLAGS.target ?= $(CXXFLAGS)
-LINK.target ?= $(LINK)
+LINK.target ?= %(LINK.target)s
LDFLAGS.target ?= $(LDFLAGS)
AR.target ?= $(AR)
ARFLAGS.target ?= %(ARFLAGS.target)s
@@ -1891,8 +1890,8 @@ def RunSystemTests(flavor):
# Compute flags used for building static archives.
# N.B.: this fallback logic should match the logic in SHARED_HEADER.
# See comment there for more details.
- ar_target = os.environ.get('AR.target', os.environ.get('AR', 'ar'))
- cc_target = os.environ.get('CC.target', os.environ.get('CC', 'cc'))
+ ar_target = os.environ.get('AR.target', os.environ.get('AR_target', 'ar'))
+ cc_target = os.environ.get('CC.target', os.environ.get('CC_target', 'cc'))
arflags_target = 'crs'
# ar -T enables thin archives on Linux. OS X's ar supports a -T flag, but it
# does something useless (it limits filenames in the archive to 15 chars).
@@ -1995,6 +1994,12 @@ def GenerateOutput(target_list, target_dicts, data, params):
'flock': 'lockf',
})
header_params.update(RunSystemTests(flavor))
+ header_params.update({
bradn 2012/07/27 23:08:54 Style guide wants these <=80 chars per line
+ 'CC.target': os.environ.get('CC.target', os.environ.get('CC_target', '$(CC)')),
+ 'AR.target': os.environ.get('AR.target', os.environ.get('AR_target', '$(AR)')),
+ 'CXX.target': os.environ.get('CXX.target', os.environ.get('CXX_target', '$(CXX)')),
+ 'LINK.target': os.environ.get('LINK.target', os.environ.get('LINK_target', '$(LINK)')) ,
+ })
build_file, _, _ = gyp.common.ParseQualifiedTarget(target_list[0])
make_global_settings_dict = data[build_file].get('make_global_settings', {})
« no previous file with comments | « no previous file | test/compiler-override/compiler.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698