Chromium Code Reviews| Index: pylib/gyp/generator/make.py |
| =================================================================== |
| --- pylib/gyp/generator/make.py (revision 1416) |
| +++ pylib/gyp/generator/make.py (working copy) |
| @@ -64,6 +64,8 @@ |
| """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) |
| + default_variables.setdefault('HOST_OS', gyp.common.GetHostOSFlavor()) |
| + |
| if flavor == 'mac': |
| default_variables.setdefault('OS', 'mac') |
| default_variables.setdefault('SHARED_LIB_SUFFIX', '.dylib') |
| @@ -1919,6 +1921,7 @@ |
| def GenerateOutput(target_list, target_dicts, data, params): |
| options = params['options'] |
| flavor = gyp.common.GetFlavor(params) |
| + host_os = gyp.common.GetHostOSFlavor() |
|
Torne
2012/08/01 11:20:32
rename to host_flavor as mentioned in other commen
|
| generator_flags = params.get('generator_flags', {}) |
| builddir_name = generator_flags.get('output_dir', 'out') |
| android_ndk_version = generator_flags.get('android_ndk_version', None) |
| @@ -1973,11 +1976,16 @@ |
| 'extra_commands': '', |
| 'srcdir': srcdir, |
| } |
| - if flavor == 'mac': |
| + if host_os == 'mac': |
| flock_command = './gyp-mac-tool flock' |
| header_params.update({ |
| 'flock': flock_command, |
| 'flock_index': 2, |
| + }) |
| + |
| + if flavor == 'mac': |
| + flock_command = './gyp-mac-tool flock' |
|
Torne
2012/08/01 11:20:32
This line should be removed, which flock to use sh
|
| + header_params.update({ |
| 'link_commands': LINK_COMMANDS_MAC, |
| 'extra_commands': SHARED_HEADER_MAC_COMMANDS, |
| }) |
| @@ -2005,8 +2013,8 @@ |
| value = '$(abspath %s)' % value |
| if key == 'LINK': |
| make_global_settings += ('%s ?= %s $(builddir)/linker.lock %s\n' % |
| - (key, flock_command, value)) |
| - elif key in ['CC', 'CXX']: |
| + (key, header_params['flock'], value)) |
|
Torne
2012/08/01 11:20:32
not sure this change is needed, remove it unless t
luke.weber
2012/08/07 11:52:35
It's not the right way to fix it, but you'll notic
|
| + elif key in ['CC', 'CXX', 'AR', 'LD', 'RANLIB']: |
|
Torne
2012/08/01 11:20:32
why do we need to handle AR/LD/RANLIB here now? (n
luke.weber
2012/08/07 11:52:35
If I don't do this it won't actually set the toolc
|
| make_global_settings += ( |
| 'ifneq (,$(filter $(origin %s), undefined default))\n' % key) |
| # Let gyp-time envvars win over global settings. |
| @@ -2035,6 +2043,8 @@ |
| # Put build-time support tools next to the root Makefile. |
| dest_path = os.path.dirname(makefile_path) |
| gyp.common.CopyTool(flavor, dest_path) |
| + if host_os == 'mac' and flavor != 'mac': |
| + gyp.common.CopyTool(host_os, dest_path) |
|
Torne
2012/08/01 11:20:32
Probably this should only happen for host, not bot
luke.weber
2012/08/07 11:52:35
Was being careful not to break anything, but I thi
|
| # Find the list of targets that derive from the gyp file(s) being built. |
| needed_targets = set() |