-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
crashpad: use patches + msvc + win_helper.py -> py3
- Loading branch information
Showing
11 changed files
with
543 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,245 @@ | ||
diff -ur source/source_subfolder/third_party/lss/lss.h build/d140711d95cc16a85766a8fc3a551dfafe84cf63/source_subfolder/third_party/lss/lss.h | ||
--- source/source_subfolder/third_party/lss/lss.h 2021-05-21 23:40:37.288208700 +0200 | ||
+++ build/d140711d95cc16a85766a8fc3a551dfafe84cf63/source_subfolder/third_party/lss/lss.h 2021-05-21 23:40:46.381240300 +0200 | ||
@@ -16,9 +16,9 @@ | ||
#define CRASHPAD_THIRD_PARTY_LSS_LSS_H_ | ||
|
||
#if defined(CRASHPAD_LSS_SOURCE_EXTERNAL) | ||
-#include "third_party/lss/linux_syscall_support.h" | ||
+#include <linux_syscall_support.h> | ||
#elif defined(CRASHPAD_LSS_SOURCE_EMBEDDED) | ||
-#include "third_party/lss/lss/linux_syscall_support.h" | ||
+#include <linux_syscall_support.h> | ||
#else | ||
#error Unknown lss source | ||
#endif | ||
diff -ur source/source_subfolder/third_party/mini_chromium/mini_chromium/build/common.gypi build/d140711d95cc16a85766a8fc3a551dfafe84cf63/source_subfolder/third_party/mini_chromium/mini_chromium/build/common.gypi | ||
--- source/source_subfolder/third_party/mini_chromium/mini_chromium/build/common.gypi 2021-05-21 23:40:37.700972700 +0200 | ||
+++ build/d140711d95cc16a85766a8fc3a551dfafe84cf63/source_subfolder/third_party/mini_chromium/mini_chromium/build/common.gypi 2021-05-21 23:40:46.354256400 +0200 | ||
@@ -124,7 +124,7 @@ | ||
|
||
['OS=="linux" or OS=="android"', { | ||
'cflags': [ | ||
- '-fPIC', | ||
+ '', | ||
'-fno-exceptions', | ||
'-fno-strict-aliasing', # See http://crbug.com/32204 | ||
'-fstack-protector-all', # Implies -fstack-protector | ||
@@ -148,7 +148,7 @@ | ||
'_FILE_OFFSET_BITS=64', | ||
], | ||
'ldflags': [ | ||
- '-fPIC', | ||
+ '', | ||
'-pthread', | ||
'-Wl,--as-needed', | ||
'-Wl,-z,noexecstack', | ||
diff -ur source/source_subfolder/third_party/mini_chromium/mini_chromium/build/config/BUILD.gn build/d140711d95cc16a85766a8fc3a551dfafe84cf63/source_subfolder/third_party/mini_chromium/mini_chromium/build/config/BUILD.gn | ||
--- source/source_subfolder/third_party/mini_chromium/mini_chromium/build/config/BUILD.gn 2021-05-21 23:40:37.702970800 +0200 | ||
+++ build/d140711d95cc16a85766a8fc3a551dfafe84cf63/source_subfolder/third_party/mini_chromium/mini_chromium/build/config/BUILD.gn 2021-05-21 23:40:46.423216100 +0200 | ||
@@ -103,7 +103,7 @@ | ||
} | ||
} else if (mini_chromium_is_win) { | ||
cflags = [ | ||
- "/GL", # LTCG. | ||
+ # LTCG. | ||
"/O2", | ||
"/Ob2", # Both explicit and auto inlining. | ||
"/Oy-", # Disable omitting frame pointers, must be after /O2. | ||
@@ -193,7 +193,7 @@ | ||
"arm64", | ||
] | ||
} else { | ||
- assert(false, "Unsupported architecture") | ||
+ print("Unknown architecture -> assume conan knows how to handle it") | ||
} | ||
} | ||
|
||
@@ -239,7 +239,7 @@ | ||
"/D_UNICODE", | ||
"/FS", | ||
"/W4", | ||
- "/WX", | ||
+ | ||
"/Zi", | ||
"/bigobj", # Support larger number of sections in obj file. | ||
"/wd4100", # Unreferenced formal parameter. | ||
@@ -268,7 +268,7 @@ | ||
"-m64", | ||
] | ||
} else { | ||
- assert(false, "Unsupported architecture") | ||
+ print("Unknown architecture -> assume conan knows how to handle it") | ||
} | ||
|
||
# This is currently required by the clang toolchain build that DEPS uses | ||
@@ -302,7 +302,7 @@ | ||
} else if (target_cpu == "x64") { | ||
common_flags += [ "--target=x86_64-fuchsia" ] | ||
} else { | ||
- assert(false, "Unsupported architecture") | ||
+ print("Unknown architecture -> assume conan knows how to handle it") | ||
} | ||
|
||
# fdio is listed in ldflags instead of libs because it’s important for it to | ||
@@ -319,7 +319,7 @@ | ||
|
||
if ((mini_chromium_is_posix && !mini_chromium_is_mac && | ||
!mini_chromium_is_ios) || mini_chromium_is_fuchsia) { | ||
- cflags += [ "-fPIC" ] | ||
+ cflags += [ "" ] | ||
ldflags += [ | ||
# This must follow Fuchsia’s fdio library above. | ||
"-Wl,--as-needed", | ||
@@ -393,8 +393,8 @@ | ||
ar = rebase_path(clang_path, root_build_dir) + "/bin/llvm-ar" | ||
ld = cxx | ||
} else { | ||
- cc = "clang" | ||
- cxx = "clang++" | ||
+ cc = getenv("CC") | ||
+ cxx = getenv("CXX") | ||
asm = cxx | ||
ld = cxx | ||
|
||
diff -ur source/source_subfolder/third_party/mini_chromium/mini_chromium/build/win_helper.py build/d140711d95cc16a85766a8fc3a551dfafe84cf63/source_subfolder/third_party/mini_chromium/mini_chromium/build/win_helper.py | ||
--- source/source_subfolder/third_party/mini_chromium/mini_chromium/build/win_helper.py 2021-05-21 23:40:37.715964200 +0200 | ||
+++ build/d140711d95cc16a85766a8fc3a551dfafe84cf63/source_subfolder/third_party/mini_chromium/mini_chromium/build/win_helper.py 2021-05-21 23:40:46.406226100 +0200 | ||
@@ -4,7 +4,10 @@ | ||
# Use of this source code is governed by a BSD-style license that can be | ||
# found in the LICENSE file. | ||
|
||
-import _winreg | ||
+try: | ||
+ import _winreg | ||
+except ImportError: | ||
+ import winreg as _winreg | ||
import os | ||
import re | ||
import subprocess | ||
@@ -62,7 +65,7 @@ | ||
CreateProcess() documentation for more details.""" | ||
block = '' | ||
nul = '\0' | ||
- for key, value in envvar_dict.iteritems(): | ||
+ for key, value in envvar_dict.items(): | ||
block += key + '=' + value + nul | ||
block += nul | ||
return block | ||
@@ -81,7 +84,7 @@ | ||
archs = ('x86', 'amd64', 'arm64') | ||
result = [] | ||
for arch in archs: | ||
- # Extract environment variables for subprocesses. | ||
+ sys.stderr.write("install_dir {} script_path {}".format(install_dir, script_path)) | ||
args = [os.path.join(install_dir, script_path)] | ||
script_arch_name = arch | ||
if script_path.endswith('SetEnv.cmd') and arch == 'amd64': | ||
@@ -94,12 +97,12 @@ | ||
variables, _ = popen.communicate() | ||
if popen.returncode != 0: | ||
raise Exception('"%s" failed with error %d' % (args, popen.returncode)) | ||
- env = _ExtractImportantEnvironment(variables) | ||
+ env = _ExtractImportantEnvironment(variables.decode()) | ||
|
||
env_block = _FormatAsEnvironmentBlock(env) | ||
basename = 'environment.' + arch | ||
with open(os.path.join(out_dir, basename), 'wb') as f: | ||
- f.write(env_block) | ||
+ f.write(env_block.encode()) | ||
result.append(basename) | ||
return result | ||
|
||
@@ -139,10 +142,10 @@ | ||
link = subprocess.Popen(args, env=env, shell=True, stdout=subprocess.PIPE) | ||
out, _ = link.communicate() | ||
for line in out.splitlines(): | ||
- if (not line.startswith(' Creating library ') and | ||
- not line.startswith('Generating code') and | ||
- not line.startswith('Finished generating code')): | ||
- print line | ||
+ if (not line.startswith(b' Creating library ') and | ||
+ not line.startswith(b'Generating code') and | ||
+ not line.startswith(b'Finished generating code')): | ||
+ print(line) | ||
return link.returncode | ||
|
||
def ExecAsmWrapper(self, arch, *args): | ||
@@ -152,11 +155,11 @@ | ||
stdout=subprocess.PIPE, stderr=subprocess.STDOUT) | ||
out, _ = popen.communicate() | ||
for line in out.splitlines(): | ||
- if (not line.startswith('Copyright (C) Microsoft Corporation') and | ||
- not line.startswith('Microsoft (R) Macro Assembler') and | ||
- not line.startswith(' Assembling: ') and | ||
+ if (not line.startswith(b'Copyright (C) Microsoft Corporation') and | ||
+ not line.startswith(b'Microsoft (R) Macro Assembler') and | ||
+ not line.startswith(b' Assembling: ') and | ||
line): | ||
- print line | ||
+ print(line) | ||
return popen.returncode | ||
|
||
def ExecGetVisualStudioData(self, outdir, toolchain_path): | ||
@@ -178,7 +181,7 @@ | ||
'Microsoft Visual Studio', 'Installer', 'vswhere.exe') | ||
if os.path.exists(vswhere_path): | ||
installation_path = subprocess.check_output( | ||
- [vswhere_path, '-latest', '-property', 'installationPath']).strip() | ||
+ [vswhere_path, '-latest', '-property', 'installationPath']).strip().decode() | ||
if installation_path: | ||
return (installation_path, | ||
os.path.join('VC', 'Auxiliary', 'Build', 'vcvarsall.bat')) | ||
@@ -207,7 +210,7 @@ | ||
x86_environment_file = "%s" | ||
x64_environment_file = "%s" | ||
arm64_environment_file = "%s"''' % (install_dir, x86_file, x64_file, arm64_file) | ||
- print result | ||
+ print(result) | ||
return 0 | ||
|
||
def ExecStamp(self, path): | ||
diff -ur source/source_subfolder/third_party/zlib/BUILD.gn build/d140711d95cc16a85766a8fc3a551dfafe84cf63/source_subfolder/third_party/zlib/BUILD.gn | ||
--- source/source_subfolder/third_party/zlib/BUILD.gn 2021-05-21 23:40:37.300202000 +0200 | ||
+++ build/d140711d95cc16a85766a8fc3a551dfafe84cf63/source_subfolder/third_party/zlib/BUILD.gn 2021-05-21 23:40:46.425215600 +0200 | ||
@@ -19,7 +19,7 @@ | ||
} else if (!crashpad_is_win && !crashpad_is_fuchsia) { | ||
zlib_source = "system" | ||
} else if (crashpad_is_standalone) { | ||
- zlib_source = "embedded" | ||
+ zlib_source = "system" | ||
} else if (crashpad_is_external) { | ||
zlib_source = "external_with_embedded_build" | ||
} | ||
@@ -46,7 +46,7 @@ | ||
} else if (zlib_source == "system") { | ||
source_set("zlib") { | ||
public_configs = [ ":zlib_config" ] | ||
- libs = [ "z" ] | ||
+ libs = [ "zlib.lib" ] | ||
} | ||
} else if (zlib_source == "embedded" || | ||
zlib_source == "external_with_embedded_build") { | ||
diff -ur source/source_subfolder/util/BUILD.gn build/d140711d95cc16a85766a8fc3a551dfafe84cf63/source_subfolder/util/BUILD.gn | ||
--- source/source_subfolder/util/BUILD.gn 2021-05-21 23:40:37.318190700 +0200 | ||
+++ build/d140711d95cc16a85766a8fc3a551dfafe84cf63/source_subfolder/util/BUILD.gn 2021-05-21 23:40:46.344261900 +0200 | ||
@@ -402,8 +402,8 @@ | ||
deps += [ "//third_party/boringssl" ] | ||
} else { | ||
libs = [ | ||
- "crypto", | ||
"ssl", | ||
+ "crypto", | ||
] | ||
} | ||
} | ||
@@ -670,8 +670,8 @@ | ||
deps += [ "//third_party/boringssl" ] | ||
} else { | ||
libs = [ | ||
- "crypto", | ||
"ssl", | ||
+ "crypto", | ||
] | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
recipes/crashpad/all/patches/cci.20210507-0001-fix-openssl-link-order.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
Order of ssl and crypto is wrong (first ssl, then crypto) | ||
--- util/BUILD.gn | ||
+++ util/BUILD.gn | ||
@@ -402,8 +402,8 @@ | ||
deps += [ "//third_party/boringssl" ] | ||
} else { | ||
libs = [ | ||
- "crypto", | ||
"ssl", | ||
+ "crypto", | ||
] | ||
} | ||
} | ||
@@ -670,8 +670,8 @@ | ||
deps += [ "//third_party/boringssl" ] | ||
} else { | ||
libs = [ | ||
- "crypto", | ||
"ssl", | ||
+ "crypto", | ||
] | ||
} | ||
} |
Oops, something went wrong.