| Index: pylib/gyp/generator/ninja.py
|
| ===================================================================
|
| --- pylib/gyp/generator/ninja.py (revision 1953)
|
| +++ pylib/gyp/generator/ninja.py (working copy)
|
| @@ -375,6 +375,10 @@
|
| self.config_name = config_name
|
| self.name = spec['target_name']
|
| self.toolset = spec['toolset']
|
| +
|
| + if self.toolset == 'target' and generator_supports_multiple_toolsets:
|
| + self.flavor = 'linux' # lol
|
| +
|
| config = spec['configurations'][config_name]
|
| self.target = Target(spec['type'])
|
| self.is_standalone_static_library = bool(
|
| @@ -943,6 +947,9 @@
|
| variables, output, implicit = precompiled_header.GetFlagsModifications(
|
| input, output, implicit, command, cflags_c, cflags_cc,
|
| self.ExpandSpecial)
|
| + # hosting on win will need this too:
|
| + #if self.toolset == 'host':
|
| + #command += '_host'
|
| ninja_file.build(output, command, input,
|
| implicit=[gch for _, _, gch in implicit],
|
| order_only=predepends, variables=variables)
|
| @@ -1003,6 +1010,11 @@
|
| }[spec['type']]
|
| command_suffix = ''
|
|
|
| + if self.toolset == 'host':
|
| + # This is on command_suffix instead of command_suffix so that notoc
|
| + # versions become solink_notoc_host, not solink_host_notoc.
|
| + command_suffix += '_host'
|
| +
|
| implicit_deps = set()
|
| solibs = set()
|
|
|
| @@ -1497,7 +1509,8 @@
|
| global generator_additional_non_configuration_keys
|
| global generator_additional_path_sections
|
| flavor = gyp.common.GetFlavor(params)
|
| - if flavor == 'mac':
|
| + # Bleh, SHARED_LIB_SUFFIX is per-toolset; gyp doesn't expect that as of yet.
|
| + if False and flavor == 'mac':
|
| default_variables.setdefault('OS', 'mac')
|
| default_variables.setdefault('SHARED_LIB_SUFFIX', '.dylib')
|
| default_variables.setdefault('SHARED_LIB_DIR',
|
| @@ -1919,7 +1932,7 @@
|
| '$arch $asm $defines $includes $asmflags /c /Fo $out $in' %
|
| sys.executable))
|
|
|
| - if flavor != 'mac' and flavor != 'win':
|
| + if True or flavor != 'mac' and flavor != 'win':
|
| master_ninja.rule(
|
| 'alink',
|
| description='AR $out',
|
| @@ -1969,7 +1982,8 @@
|
| command=('$ld $ldflags -o $out '
|
| '-Wl,--start-group $in -Wl,--end-group $solibs $libs'),
|
| pool='link_pool')
|
| - elif flavor == 'win':
|
| +
|
| + if flavor == 'win':
|
| master_ninja.rule(
|
| 'alink',
|
| description='LIB $out',
|
| @@ -1980,7 +1994,7 @@
|
| rspfile_content='$in_newline $libflags')
|
| _AddWinLinkRules(master_ninja, embed_manifest=True)
|
| _AddWinLinkRules(master_ninja, embed_manifest=False)
|
| - else:
|
| + elif flavor == 'mac':
|
| master_ninja.rule(
|
| 'objc',
|
| description='OBJC $out',
|
| @@ -1996,14 +2010,14 @@
|
| depfile='$out.d',
|
| deps=deps)
|
| master_ninja.rule(
|
| - 'alink',
|
| + 'alink_host',
|
| description='LIBTOOL-STATIC $out, POSTBUILDS',
|
| command='rm -f $out && '
|
| './gyp-mac-tool filter-libtool libtool $libtool_flags '
|
| '-static -o $out $in'
|
| '$postbuilds')
|
| master_ninja.rule(
|
| - 'lipo',
|
| + 'lipo_host',
|
| description='LIPO $out, POSTBUILDS',
|
| command='rm -f $out && lipo -create $in -output $out$postbuilds')
|
|
|
| @@ -2031,7 +2045,7 @@
|
|
|
| solink_suffix = '@$link_file_list$postbuilds'
|
| master_ninja.rule(
|
| - 'solink',
|
| + 'solink_host',
|
| description='SOLINK $lib, POSTBUILDS',
|
| restat=True,
|
| command=mtime_preserving_solink_base % {'suffix': solink_suffix,
|
| @@ -2040,7 +2054,7 @@
|
| rspfile_content='$in $solibs $libs',
|
| pool='link_pool')
|
| master_ninja.rule(
|
| - 'solink_notoc',
|
| + 'solink_notoc_host',
|
| description='SOLINK $lib, POSTBUILDS',
|
| restat=True,
|
| command=solink_base % {'suffix':solink_suffix, 'type': '-shared'},
|
| @@ -2049,7 +2063,7 @@
|
| pool='link_pool')
|
|
|
| master_ninja.rule(
|
| - 'solink_module',
|
| + 'solink_module_host',
|
| description='SOLINK(module) $lib, POSTBUILDS',
|
| restat=True,
|
| command=mtime_preserving_solink_base % {'suffix': solink_suffix,
|
| @@ -2058,7 +2072,7 @@
|
| rspfile_content='$in $solibs $libs',
|
| pool='link_pool')
|
| master_ninja.rule(
|
| - 'solink_module_notoc',
|
| + 'solink_module_notoc_host',
|
| description='SOLINK(module) $lib, POSTBUILDS',
|
| restat=True,
|
| command=solink_base % {'suffix': solink_suffix, 'type': '-bundle'},
|
| @@ -2067,11 +2081,12 @@
|
| pool='link_pool')
|
|
|
| master_ninja.rule(
|
| - 'link',
|
| + 'link_host',
|
| description='LINK $out, POSTBUILDS',
|
| command=('$ld $ldflags -o $out '
|
| '$in $solibs $libs$postbuilds'),
|
| pool='link_pool')
|
| +
|
| master_ninja.rule(
|
| 'preprocess_infoplist',
|
| description='PREPROCESS INFOPLIST $out',
|
|
|