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

Unified Diff: pylib/gyp/generator/ninja.py

Issue 10795044: Support Mac android cross compile. Base URL: http://gyp.googlecode.com/svn/trunk/
Patch Set: 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
« pylib/gyp/generator/make.py ('K') | « pylib/gyp/generator/make.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pylib/gyp/generator/ninja.py
===================================================================
--- pylib/gyp/generator/ninja.py (revision 1416)
+++ pylib/gyp/generator/ninja.py (working copy)
@@ -1142,6 +1142,7 @@
global generator_additional_path_sections
cc_target = os.environ.get('CC.target', os.environ.get('CC', 'cc'))
flavor = gyp.common.GetFlavor(params)
+ default_variables.setdefault('HOST_OS', gyp.common.GetHostOSFlavor())
if flavor == 'mac':
default_variables.setdefault('OS', 'mac')
default_variables.setdefault('SHARED_LIB_SUFFIX', '.dylib')
@@ -1226,6 +1227,7 @@
config_name):
options = params['options']
flavor = gyp.common.GetFlavor(params)
+ host_os = gyp.common.GetHostOSFlavor()
generator_flags = params.get('generator_flags', {})
# build_dir: relative path from source root to our output files.
@@ -1241,6 +1243,8 @@
# Put build-time support tools in out/{config_name}.
gyp.common.CopyTool(flavor, toplevel_build)
+ if host_os == 'mac' and flavor != 'mac':
+ gyp.common.CopyTool(flavor, toplevel_build)
Torne 2012/08/01 11:20:32 See comment in make.py but also you've copypasted
# Grab make settings for CC/CXX.
if flavor == 'win':
@@ -1256,7 +1260,7 @@
if key == 'CXX': cxx = os.path.join(build_to_root, value)
flock = 'flock'
- if flavor == 'mac':
+ if host_os == 'mac':
flock = './gyp-mac-tool flock'
master_ninja.variable('cc', os.environ.get('CC', cc))
master_ninja.variable('cxx', os.environ.get('CXX', cxx))
@@ -1281,7 +1285,7 @@
else:
master_ninja.variable('ld_target', flock + ' linker.lock $cxx_target')
- if flavor == 'mac':
+ if host_os == 'mac':
master_ninja.variable('mac_tool', os.path.join('.', 'gyp-mac-tool'))
master_ninja.newline()
@@ -1444,14 +1448,17 @@
command=('$cc -E -P -Wno-trigraphs -x c $defines $in -o $out && '
'plutil -convert xml1 $out $out'))
master_ninja.rule(
- 'mac_tool',
- description='MACTOOL $mactool_cmd $in',
- command='$env $mac_tool $mactool_cmd $in $out')
- master_ninja.rule(
'package_framework',
description='PACKAGE FRAMEWORK $out, POSTBUILDS',
command='$mac_tool package-framework $out $version$postbuilds '
'&& touch $out')
+
+ if host_os == 'mac':
+ master_ninja.rule(
+ 'mac_tool',
+ description='MACTOOL $mactool_cmd $in',
+ command='$env $mac_tool $mactool_cmd $in $out')
+
if flavor == 'win':
master_ninja.rule(
'stamp',
« pylib/gyp/generator/make.py ('K') | « pylib/gyp/generator/make.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698