mirror of
https://github.com/chromium/crashpad.git
synced 2024-12-27 15:32:10 +08:00
Update Crashpad scripts to python3
Also update mini_chromium to f87a38442a9e for python3 changes. Change-Id: I4ca7aa4cc9dcc97698fc0bc13cfb339421668074 Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3542572 Reviewed-by: Mark Mentovai <mark@chromium.org> Commit-Queue: Justin Cohen <justincohen@chromium.org>
This commit is contained in:
parent
25e67e285c
commit
f88a116c0e
1
.gn
1
.gn
@ -13,3 +13,4 @@
|
|||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
buildconfig = "//build/BUILDCONFIG.gn"
|
buildconfig = "//build/BUILDCONFIG.gn"
|
||||||
|
script_executable = "python3"
|
||||||
|
4
DEPS
4
DEPS
@ -39,7 +39,7 @@ deps = {
|
|||||||
'e1e7b0ad8ee99a875b272c8e33e308472e897660',
|
'e1e7b0ad8ee99a875b272c8e33e308472e897660',
|
||||||
'crashpad/third_party/mini_chromium/mini_chromium':
|
'crashpad/third_party/mini_chromium/mini_chromium':
|
||||||
Var('chromium_git') + '/chromium/mini_chromium@' +
|
Var('chromium_git') + '/chromium/mini_chromium@' +
|
||||||
'6e2f204b4ae135c40a6c4b3c3a01f48a86c5e886',
|
'f87a38442a9e7ba88d1c4f479e9167927eae84ed',
|
||||||
'crashpad/third_party/libfuzzer/src':
|
'crashpad/third_party/libfuzzer/src':
|
||||||
Var('chromium_git') + '/chromium/llvm-project/compiler-rt/lib/fuzzer.git@' +
|
Var('chromium_git') + '/chromium/llvm-project/compiler-rt/lib/fuzzer.git@' +
|
||||||
'fda403cf93ecb8792cb1d061564d89a6553ca020',
|
'fda403cf93ecb8792cb1d061564d89a6553ca020',
|
||||||
@ -169,7 +169,7 @@ hooks = [
|
|||||||
'pattern': '.',
|
'pattern': '.',
|
||||||
'condition': 'run_setup_ios_gn and checkout_ios',
|
'condition': 'run_setup_ios_gn and checkout_ios',
|
||||||
'action': [
|
'action': [
|
||||||
'python',
|
'python3',
|
||||||
'crashpad/build/ios/setup_ios_gn.py'
|
'crashpad/build/ios/setup_ios_gn.py'
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
# Copyright 2020 The Crashpad Authors. All rights reserved.
|
# Copyright 2020 The Crashpad Authors. All rights reserved.
|
||||||
#
|
#
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
# Copyright 2020 The Crashpad Authors. All rights reserved.
|
# Copyright 2020 The Crashpad Authors. All rights reserved.
|
||||||
#
|
#
|
||||||
@ -23,29 +23,20 @@ import shutil
|
|||||||
import subprocess
|
import subprocess
|
||||||
import sys
|
import sys
|
||||||
import tempfile
|
import tempfile
|
||||||
|
|
||||||
try:
|
|
||||||
import configparser
|
import configparser
|
||||||
except ImportError:
|
|
||||||
import ConfigParser as configparser
|
|
||||||
|
|
||||||
try:
|
|
||||||
import StringIO as io
|
|
||||||
except ImportError:
|
|
||||||
import io
|
import io
|
||||||
|
|
||||||
SUPPORTED_TARGETS = ('iphoneos', 'iphonesimulator')
|
SUPPORTED_TARGETS = ('iphoneos', 'iphonesimulator')
|
||||||
SUPPORTED_CONFIGS = ('Debug', 'Release', 'Profile', 'Official', 'Coverage')
|
SUPPORTED_CONFIGS = ('Debug', 'Release', 'Profile', 'Official', 'Coverage')
|
||||||
|
|
||||||
|
|
||||||
class ConfigParserWithStringInterpolation(configparser.SafeConfigParser):
|
class ConfigParserWithStringInterpolation(configparser.ConfigParser):
|
||||||
'''A .ini file parser that supports strings and environment variables.'''
|
'''A .ini file parser that supports strings and environment variables.'''
|
||||||
|
|
||||||
ENV_VAR_PATTERN = re.compile(r'\$([A-Za-z0-9_]+)')
|
ENV_VAR_PATTERN = re.compile(r'\$([A-Za-z0-9_]+)')
|
||||||
|
|
||||||
def values(self, section):
|
def values(self, section):
|
||||||
return map(lambda kv: self._UnquoteString(self._ExpandEnvVar(kv[1])),
|
return [self._UnquoteString(self._ExpandEnvVar(kv[1])) for kv in configparser.ConfigParser.items(self, section)]
|
||||||
configparser.ConfigParser.items(self, section))
|
|
||||||
|
|
||||||
def getstring(self, section, option):
|
def getstring(self, section, option):
|
||||||
return self._UnquoteString(self._ExpandEnvVar(self.get(section,
|
return self._UnquoteString(self._ExpandEnvVar(self.get(section,
|
||||||
@ -110,7 +101,7 @@ class GnGenerator(object):
|
|||||||
args.append(('target_cpu', target_cpu))
|
args.append(('target_cpu', target_cpu))
|
||||||
args.append(
|
args.append(
|
||||||
('additional_target_cpus',
|
('additional_target_cpus',
|
||||||
[cpu for cpu in cpu_values.itervalues() if cpu != target_cpu]))
|
[cpu for cpu in cpu_values.values() if cpu != target_cpu]))
|
||||||
else:
|
else:
|
||||||
args.append(('target_cpu', cpu_values[build_arch]))
|
args.append(('target_cpu', cpu_values[build_arch]))
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
# Copyright 2017 The Crashpad Authors. All rights reserved.
|
# Copyright 2017 The Crashpad Authors. All rights reserved.
|
||||||
#
|
#
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
# Copyright 2015 The Crashpad Authors. All rights reserved.
|
# Copyright 2015 The Crashpad Authors. All rights reserved.
|
||||||
#
|
#
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
# Copyright 2019 The Crashpad Authors. All rights reserved.
|
# Copyright 2019 The Crashpad Authors. All rights reserved.
|
||||||
#
|
#
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python3
|
||||||
# coding: utf-8
|
|
||||||
|
|
||||||
# Copyright 2019 The Crashpad Authors. All rights reserved.
|
# Copyright 2019 The Crashpad Authors. All rights reserved.
|
||||||
#
|
#
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
# Copyright 2019 The Crashpad Authors. All rights reserved.
|
# Copyright 2019 The Crashpad Authors. All rights reserved.
|
||||||
#
|
#
|
||||||
|
Loading…
x
Reference in New Issue
Block a user