Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(177)

Side by Side Diff: build/gyp_crashpad.py

Issue 1349313003: win: support x64 reading x86 (wow64) (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: mac Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | build/run_tests.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 2
3 # Copyright 2014 The Crashpad Authors. All rights reserved. 3 # Copyright 2014 The Crashpad Authors. All rights reserved.
4 # 4 #
5 # Licensed under the Apache License, Version 2.0 (the "License"); 5 # Licensed under the Apache License, Version 2.0 (the "License");
6 # you may not use this file except in compliance with the License. 6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at 7 # You may obtain a copy of the License at
8 # 8 #
9 # http://www.apache.org/licenses/LICENSE-2.0 9 # http://www.apache.org/licenses/LICENSE-2.0
10 # 10 #
11 # Unless required by applicable law or agreed to in writing, software 11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS, 12 # distributed under the License is distributed on an "AS IS" BASIS,
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and 14 # See the License for the specific language governing permissions and
15 # limitations under the License. 15 # limitations under the License.
16 16
17 import os 17 import os
18 import sys 18 import sys
19 19
20 script_dir = os.path.dirname(__file__) 20 script_dir = os.path.dirname(__file__)
21 crashpad_dir = os.path.dirname(script_dir) if script_dir is not '' else '..' 21 crashpad_dir = os.path.dirname(script_dir) if script_dir is not '' else '..'
22 sys.path.insert( 22 sys.path.insert(
23 0, os.path.join(crashpad_dir, 'third_party', 'gyp', 'gyp', 'pylib')) 23 0, os.path.join(crashpad_dir, 'third_party', 'gyp', 'gyp', 'pylib'))
24 24
25 import gyp 25 import gyp
26 26
27
27 def main(args): 28 def main(args):
28 if 'GYP_GENERATORS' not in os.environ: 29 if 'GYP_GENERATORS' not in os.environ:
29 os.environ['GYP_GENERATORS'] = 'ninja' 30 os.environ['GYP_GENERATORS'] = 'ninja'
30 31
31 crashpad_dir_or_dot = crashpad_dir if crashpad_dir is not '' else '.' 32 crashpad_dir_or_dot = crashpad_dir if crashpad_dir is not '' else '.'
32 33
33 args.extend(['-D', 'crashpad_standalone=1']) 34 args.extend(['-D', 'crashpad_standalone=1'])
34 args.extend(['--include', os.path.join(crashpad_dir, 35 args.extend(['--include',
35 'third_party', 36 os.path.join(crashpad_dir, 'third_party', 'mini_chromium',
36 'mini_chromium', 37 'mini_chromium', 'build', 'common.gypi')])
37 'mini_chromium',
38 'build',
39 'common.gypi')])
40 args.extend(['--depth', crashpad_dir_or_dot]) 38 args.extend(['--depth', crashpad_dir_or_dot])
41 args.append(os.path.join(crashpad_dir, 'crashpad.gyp')) 39 args.append(os.path.join(crashpad_dir, 'crashpad.gyp'))
42 40
43 return gyp.main(args) 41 result = gyp.main(args)
42 if result != 0:
43 return result
44
45 if sys.platform == 'win32':
46 # Also generate the x86 build.
47 result = gyp.main(args + ['-D', 'target_arch=ia32', '-G', 'config=Debug'])
48 if result != 0:
49 return result
50 result = gyp.main(args + ['-D', 'target_arch=ia32', '-G', 'config=Release'])
51
52 return result
53
44 54
45 if __name__ == '__main__': 55 if __name__ == '__main__':
46 sys.exit(main(sys.argv[1:])) 56 sys.exit(main(sys.argv[1:]))
OLDNEW
« no previous file with comments | « no previous file | build/run_tests.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698