Source release v3.4.1
This commit is contained in:
2
third_party/gyp/common.py
vendored
2
third_party/gyp/common.py
vendored
@@ -429,6 +429,8 @@ def GetFlavor(params):
|
||||
return 'netbsd'
|
||||
if sys.platform.startswith('aix'):
|
||||
return 'aix'
|
||||
if sys.platform.startswith('os390'):
|
||||
return 'os390'
|
||||
|
||||
return 'linux'
|
||||
|
||||
|
||||
5
third_party/gyp/easy_xml.py
vendored
5
third_party/gyp/easy_xml.py
vendored
@@ -4,6 +4,7 @@
|
||||
|
||||
import re
|
||||
import os
|
||||
import locale
|
||||
|
||||
|
||||
def XmlToString(content, encoding='utf-8', pretty=False):
|
||||
@@ -116,6 +117,10 @@ def WriteXmlIfChanged(content, path, encoding='utf-8', pretty=False,
|
||||
if win32 and os.linesep != '\r\n':
|
||||
xml_string = xml_string.replace('\n', '\r\n')
|
||||
|
||||
default_encoding = locale.getdefaultlocale()[1]
|
||||
if default_encoding and default_encoding.upper() != encoding.upper():
|
||||
xml_string = xml_string.decode(default_encoding).encode(encoding)
|
||||
|
||||
# Get the old content
|
||||
try:
|
||||
f = open(path, 'r')
|
||||
|
||||
30
third_party/gyp/generator/make.py
vendored
30
third_party/gyp/generator/make.py
vendored
@@ -232,6 +232,24 @@ cmd_solink_module = $(LINK.$(TOOLSET)) -shared $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSE
|
||||
"""
|
||||
|
||||
|
||||
LINK_COMMANDS_OS390 = """\
|
||||
quiet_cmd_alink = AR($(TOOLSET)) $@
|
||||
cmd_alink = rm -f $@ && $(AR.$(TOOLSET)) crs $@ $(filter %.o,$^)
|
||||
|
||||
quiet_cmd_alink_thin = AR($(TOOLSET)) $@
|
||||
cmd_alink_thin = rm -f $@ && $(AR.$(TOOLSET)) crsT $@ $(filter %.o,$^)
|
||||
|
||||
quiet_cmd_link = LINK($(TOOLSET)) $@
|
||||
cmd_link = $(LINK.$(TOOLSET)) $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o $@ $(LD_INPUTS)
|
||||
|
||||
quiet_cmd_solink = SOLINK($(TOOLSET)) $@
|
||||
cmd_solink = $(LINK.$(TOOLSET)) $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o $@ $(LD_INPUTS) $(LIBS) -Wl,DLL
|
||||
|
||||
quiet_cmd_solink_module = SOLINK_MODULE($(TOOLSET)) $@
|
||||
cmd_solink_module = $(LINK.$(TOOLSET)) $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o $@ $(filter-out FORCE_DO_CMD, $^) $(LIBS) -Wl,DLL
|
||||
"""
|
||||
|
||||
|
||||
# Header of toplevel Makefile.
|
||||
# This should go into the build tree, but it's easier to keep it here for now.
|
||||
SHARED_HEADER = ("""\
|
||||
@@ -315,7 +333,7 @@ dirx = $(call unreplace_spaces,$(dir $(call replace_spaces,$1)))
|
||||
# We write to a dep file on the side first and then rename at the end
|
||||
# so we can't end up with a broken dep file.
|
||||
depfile = $(depsdir)/$(call replace_spaces,$@).d
|
||||
DEPFLAGS = -MMD -MF $(depfile).raw
|
||||
DEPFLAGS = %(makedep_args)s -MF $(depfile).raw
|
||||
|
||||
# We have to fixup the deps output in a few ways.
|
||||
# (1) the file output should mention the proper .o file.
|
||||
@@ -2022,6 +2040,7 @@ def GenerateOutput(target_list, target_dicts, data, params):
|
||||
|
||||
flock_command= 'flock'
|
||||
copy_archive_arguments = '-af'
|
||||
makedep_arguments = '-MMD'
|
||||
header_params = {
|
||||
'default_target': default_target,
|
||||
'builddir': builddir_name,
|
||||
@@ -2032,6 +2051,7 @@ def GenerateOutput(target_list, target_dicts, data, params):
|
||||
'extra_commands': '',
|
||||
'srcdir': srcdir,
|
||||
'copy_archive_args': copy_archive_arguments,
|
||||
'makedep_args': makedep_arguments,
|
||||
}
|
||||
if flavor == 'mac':
|
||||
flock_command = './gyp-mac-tool flock'
|
||||
@@ -2045,6 +2065,14 @@ def GenerateOutput(target_list, target_dicts, data, params):
|
||||
header_params.update({
|
||||
'link_commands': LINK_COMMANDS_ANDROID,
|
||||
})
|
||||
elif flavor == 'os390':
|
||||
copy_archive_arguments = '-fPR'
|
||||
makedep_arguments = '-qmakedep=gcc'
|
||||
header_params.update({
|
||||
'copy_archive_args': copy_archive_arguments,
|
||||
'makedep_args': makedep_arguments,
|
||||
'link_commands': LINK_COMMANDS_OS390,
|
||||
})
|
||||
elif flavor == 'solaris':
|
||||
header_params.update({
|
||||
'flock': './gyp-flock-tool flock',
|
||||
|
||||
16
third_party/gyp/generator/msvs.py
vendored
16
third_party/gyp/generator/msvs.py
vendored
@@ -306,9 +306,19 @@ def _ConfigWindowsTargetPlatformVersion(config_data, version):
|
||||
continue
|
||||
version = MSVSVersion._RegistryGetValue(key % ver, 'ProductVersion') or ''
|
||||
# Find a matching entry in sdk_dir\include.
|
||||
names = sorted([x for x in os.listdir(r'%s\include' % sdk_dir)
|
||||
expected_sdk_dir=r'%s\include' % sdk_dir
|
||||
names = sorted([x for x in (os.listdir(expected_sdk_dir)
|
||||
if os.path.isdir(expected_sdk_dir)
|
||||
else []
|
||||
)
|
||||
if x.startswith(version)], reverse=True)
|
||||
return names[0]
|
||||
if names:
|
||||
return names[0]
|
||||
else:
|
||||
print >> sys.stdout, (
|
||||
'Warning: No include files found for '
|
||||
'detected Windows SDK version %s' % (version)
|
||||
)
|
||||
|
||||
|
||||
def _BuildCommandLineForRuleRaw(spec, cmd, cygwin_shell, has_input_path,
|
||||
@@ -2721,7 +2731,7 @@ def _GetMSBuildGlobalProperties(spec, version, guid, gyp_file_name):
|
||||
properties[0].append(['WindowsTargetPlatformVersion',
|
||||
str(msvs_windows_sdk_version)])
|
||||
elif version.compatible_sdks:
|
||||
raise GypError('%s requires any SDK of %o version, but non were found' %
|
||||
raise GypError('%s requires any SDK of %s version, but none were found' %
|
||||
(version.description, version.compatible_sdks))
|
||||
|
||||
if platform_name == 'ARM':
|
||||
|
||||
15
third_party/gyp/generator/ninja.py
vendored
15
third_party/gyp/generator/ninja.py
vendored
@@ -2311,15 +2311,22 @@ def GenerateOutputForConfig(target_list, target_dicts, data, params,
|
||||
'stamp',
|
||||
description='STAMP $out',
|
||||
command='%s gyp-win-tool stamp $out' % sys.executable)
|
||||
master_ninja.rule(
|
||||
'copy',
|
||||
description='COPY $in $out',
|
||||
command='%s gyp-win-tool recursive-mirror $in $out' % sys.executable)
|
||||
else:
|
||||
master_ninja.rule(
|
||||
'stamp',
|
||||
description='STAMP $out',
|
||||
command='${postbuilds}touch $out')
|
||||
if flavor == 'win':
|
||||
master_ninja.rule(
|
||||
'copy',
|
||||
description='COPY $in $out',
|
||||
command='%s gyp-win-tool recursive-mirror $in $out' % sys.executable)
|
||||
elif flavor == 'os390':
|
||||
master_ninja.rule(
|
||||
'copy',
|
||||
description='COPY $in $out',
|
||||
command='rm -rf $out && cp -fRP $in $out')
|
||||
else:
|
||||
master_ninja.rule(
|
||||
'copy',
|
||||
description='COPY $in $out',
|
||||
|
||||
14
third_party/gyp/mac_tool.py
vendored
14
third_party/gyp/mac_tool.py
vendored
@@ -105,17 +105,21 @@ class MacTool(object):
|
||||
|
||||
ibtool_section_re = re.compile(r'/\*.*\*/')
|
||||
ibtool_re = re.compile(r'.*note:.*is clipping its content')
|
||||
ibtoolout = subprocess.Popen(args, stdout=subprocess.PIPE)
|
||||
try:
|
||||
stdout = subprocess.check_output(args)
|
||||
except subprocess.CalledProcessError as e:
|
||||
print(e.output)
|
||||
raise
|
||||
current_section_header = None
|
||||
for line in ibtoolout.stdout:
|
||||
for line in stdout.splitlines():
|
||||
if ibtool_section_re.match(line):
|
||||
current_section_header = line
|
||||
elif not ibtool_re.match(line):
|
||||
if current_section_header:
|
||||
sys.stdout.write(current_section_header)
|
||||
print(current_section_header)
|
||||
current_section_header = None
|
||||
sys.stdout.write(line)
|
||||
return ibtoolout.returncode
|
||||
print(line)
|
||||
return 0
|
||||
|
||||
def _ConvertToBinary(self, dest):
|
||||
subprocess.check_call([
|
||||
|
||||
Reference in New Issue
Block a user