Source release 15.1.0

This commit is contained in:
John W. Bruce
2019-03-29 18:16:05 -07:00
parent 66628486b5
commit 2b26dee09c
44 changed files with 1371 additions and 356 deletions

View File

@@ -7,21 +7,37 @@
},
'target_defaults': {
# Turn off bad-function-cast warning, as BoringSSL violates this sometimes.
'cflags': [
'-g',
'-fPIC',
'-fvisibility=hidden',
'-Wno-bad-function-cast',
# BoringSSL violates these warnings
'-Wno-cast-qual',
],
'cflags!': [
'-Wbad-function-cast',
'-Wcast-qual',
],
'cflags_cc!': [
'-Wbad-function-cast',
'-Wcast-qual',
],
'cflags_c': [
# BoringSSL violates these warnings
'-Wno-bad-function-cast',
],
'cflags_c!': [
'-Wbad-function-cast',
'-Wcast-qual',
],
'msvs_settings': {
'VCCLCompilerTool': {
# Disable warnings for third-party code.
'WarningLevel': '0',
},
},
'ldflags': [
'-fPIC',
],
@@ -41,6 +57,29 @@
],
},
'direct_dependent_settings': {
# BoringSSL's exported headers fail these warnings
'cflags': [
'-Wno-unknown-warning-option',
'-Wno-cast-qual',
],
'cflags!': [
'-Wbad-function-cast',
'-Wcast-qual',
],
'cflags_c': [
'-Wno-bad-function-cast',
],
'cflags_c!': [
'-Wbad-function-cast',
'-Wcast-qual',
],
'cflags_cc!': [
'-Wbad-function-cast',
'-Wcast-qual',
],
},
'type': 'static_library',
'standalone_static_library': 1,
},

View File

@@ -6,6 +6,7 @@
import os
import random
import sys
import gyp.common
@@ -56,8 +57,11 @@ def MakeGuid(name, seed='msvs_new'):
determine the GUID to refer to explicitly. It also means that the GUID will
not change when the project for a target is rebuilt.
"""
to_hash = str(seed) + str(name)
to_hash = to_hash.encode('utf-8')
# Calculate a MD5 signature for the seed and name.
d = _new_md5(str(seed) + str(name)).hexdigest().upper()
d = _new_md5(to_hash).hexdigest().upper()
# Convert most of the signature to GUID form (discard the rest)
guid = ('{' + d[:8] + '-' + d[8:12] + '-' + d[12:16] + '-' + d[16:20]
+ '-' + d[20:32] + '}')
@@ -71,6 +75,8 @@ class MSVSSolutionEntry(object):
# Sort by name then guid (so things are in order on vs2008).
return cmp((self.name, self.get_guid()), (other.name, other.get_guid()))
def __lt__(self, other):
return (self.name, self.get_guid()) < (other.name, other.get_guid())
class MSVSFolder(MSVSSolutionEntry):
"""Folder in a Visual Studio project or solution."""

View File

@@ -5,6 +5,7 @@
import re
import os
import locale
import sys
try:
# reduce moved to functools in python3.
@@ -121,10 +122,12 @@ def WriteXmlIfChanged(content, path, encoding='utf-8', pretty=False,
xml_string = XmlToString(content, encoding, pretty)
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)
default_encoding = locale.getdefaultlocale()[1]
if default_encoding and default_encoding.upper() != encoding.upper():
try:
xml_string = xml_string.decode(default_encoding).encode(encoding)
except AttributeError:
pass
# Get the old content
try:

View File

@@ -2712,7 +2712,7 @@ def _GetMSBuildGlobalProperties(spec, version, guid, gyp_file_name):
platform_name = None
msvs_windows_sdk_version = None
for configuration in spec['configurations'].itervalues():
for configuration in spec['configurations'].values():
platform_name = platform_name or _ConfigPlatform(configuration)
msvs_windows_sdk_version = (msvs_windows_sdk_version or
_ConfigWindowsTargetPlatformVersion(configuration, version))

View File

@@ -58,6 +58,7 @@
'-Wno-invalid-offsetof',
'-Wno-cast-qual',
'-Wno-ignored-qualifiers',
'-Wno-inconsistent-missing-override',
],
'excluded_cflags': [
# In addition to turning these off above, GYP's order-of-operations means
@@ -69,6 +70,7 @@
'-Winvalid-offsetof',
'-Wcast-qual',
'-Wignored-qualifiers',
'-Winconsistent-missing-override',
],
},
'target_defaults': {
@@ -84,10 +86,8 @@
'cflags_cc!': ['<@(excluded_cflags)'],
'msvs_settings': {
'VCCLCompilerTool': {
'DisableSpecificWarnings': [
'4005', # Duplicate #define with WIN32_LEAN_AND_MEAN.
'4506', # Missing definition of inline template.
],
# Disable warnings for third-party code.
'WarningLevel': '0',
},
},
},