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

Side by Side Diff: native_client_sdk/src/build_tools/build_projects.py

Issue 1493443002: Revert of [NaCl SDK] Remove support for bionic toolchain (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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 | « native_client_sdk/src/BUILDING.rst ('k') | native_client_sdk/src/build_tools/build_sdk.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 # Copyright (c) 2013 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2013 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 import argparse 6 import argparse
7 import multiprocessing 7 import multiprocessing
8 import os 8 import os
9 import posixpath 9 import posixpath
10 import sys 10 import sys
(...skipping 12 matching lines...) Expand all
23 import getos 23 import getos
24 24
25 25
26 MAKE = 'nacl_sdk/make_3.99.90-26-gf80222c/make.exe' 26 MAKE = 'nacl_sdk/make_3.99.90-26-gf80222c/make.exe'
27 LIB_DICT = { 27 LIB_DICT = {
28 'linux': [], 28 'linux': [],
29 'mac': [], 29 'mac': [],
30 'win': ['x86_32'] 30 'win': ['x86_32']
31 } 31 }
32 VALID_TOOLCHAINS = [ 32 VALID_TOOLCHAINS = [
33 'bionic',
33 'newlib', 34 'newlib',
34 'clang-newlib', 35 'clang-newlib',
35 'glibc', 36 'glibc',
36 'pnacl', 37 'pnacl',
37 'win', 38 'win',
38 'linux', 39 'linux',
39 'mac', 40 'mac',
40 ] 41 ]
41 42
42 # Global verbosity setting. 43 # Global verbosity setting.
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 # build. 206 # build.
206 env['X86_32_CFLAGS'] = '-m32' 207 env['X86_32_CFLAGS'] = '-m32'
207 env['X86_32_CXXFLAGS'] = '-m32' 208 env['X86_32_CXXFLAGS'] = '-m32'
208 jobs = '50' 209 jobs = '50'
209 else: 210 else:
210 jobs = str(multiprocessing.cpu_count()) 211 jobs = str(multiprocessing.cpu_count())
211 212
212 make_cmd = [make, '-j', jobs] 213 make_cmd = [make, '-j', jobs]
213 214
214 make_cmd.append('CONFIG='+config) 215 make_cmd.append('CONFIG='+config)
216 # We always ENABLE_BIONIC in case we need it. If neither --bionic nor
217 # -t bionic have been provided on the command line, then VALID_TOOLCHAINS
218 # will not contain a bionic target.
219 make_cmd.append('ENABLE_BIONIC=1')
215 if not deps: 220 if not deps:
216 make_cmd.append('IGNORE_DEPS=1') 221 make_cmd.append('IGNORE_DEPS=1')
217 222
218 if verbose: 223 if verbose:
219 make_cmd.append('V=1') 224 make_cmd.append('V=1')
220 225
221 if args: 226 if args:
222 make_cmd += args 227 make_cmd += args
223 else: 228 else:
224 make_cmd.append('TOOLCHAIN=all') 229 make_cmd.append('TOOLCHAIN=all')
(...skipping 19 matching lines...) Expand all
244 parser = argparse.ArgumentParser(description=__doc__) 249 parser = argparse.ArgumentParser(description=__doc__)
245 parser.add_argument('-c', '--clobber', 250 parser.add_argument('-c', '--clobber',
246 help='Clobber project directories before copying new files', 251 help='Clobber project directories before copying new files',
247 action='store_true', default=False) 252 action='store_true', default=False)
248 parser.add_argument('-b', '--build', 253 parser.add_argument('-b', '--build',
249 help='Build the projects. Otherwise the projects are only copied.', 254 help='Build the projects. Otherwise the projects are only copied.',
250 action='store_true') 255 action='store_true')
251 parser.add_argument('--config', 256 parser.add_argument('--config',
252 help='Choose configuration to build (Debug or Release). Builds both ' 257 help='Choose configuration to build (Debug or Release). Builds both '
253 'by default') 258 'by default')
259 parser.add_argument('--bionic',
260 help='Enable bionic projects', action='store_true')
254 parser.add_argument('-x', '--experimental', 261 parser.add_argument('-x', '--experimental',
255 help='Build experimental projects', action='store_true') 262 help='Build experimental projects', action='store_true')
256 parser.add_argument('-t', '--toolchain', 263 parser.add_argument('-t', '--toolchain',
257 help='Build using toolchain. Can be passed more than once.', 264 help='Build using toolchain. Can be passed more than once.',
258 action='append', default=[]) 265 action='append', default=[])
259 parser.add_argument('-d', '--dest', 266 parser.add_argument('-d', '--dest',
260 help='Select which build destinations (project types) are valid.', 267 help='Select which build destinations (project types) are valid.',
261 action='append') 268 action='append')
262 parser.add_argument('projects', nargs='*', 269 parser.add_argument('projects', nargs='*',
263 help='Select which projects to build.') 270 help='Select which projects to build.')
(...skipping 23 matching lines...) Expand all
287 294
288 pepper_ver = str(int(build_version.ChromeMajorVersion())) 295 pepper_ver = str(int(build_version.ChromeMajorVersion()))
289 pepperdir = os.path.join(OUT_DIR, 'pepper_' + pepper_ver) 296 pepperdir = os.path.join(OUT_DIR, 'pepper_' + pepper_ver)
290 297
291 if not options.toolchain: 298 if not options.toolchain:
292 # Order matters here: the default toolchain for an example's Makefile will 299 # Order matters here: the default toolchain for an example's Makefile will
293 # be the first toolchain in this list that is available in the example. 300 # be the first toolchain in this list that is available in the example.
294 # e.g. If an example supports newlib and glibc, then the default will be 301 # e.g. If an example supports newlib and glibc, then the default will be
295 # newlib. 302 # newlib.
296 options.toolchain = ['pnacl', 'newlib', 'glibc', 'host', 'clang-newlib'] 303 options.toolchain = ['pnacl', 'newlib', 'glibc', 'host', 'clang-newlib']
304 if options.experimental or options.bionic:
305 options.toolchain.append('bionic')
297 306
298 if 'host' in options.toolchain: 307 if 'host' in options.toolchain:
299 options.toolchain.remove('host') 308 options.toolchain.remove('host')
300 options.toolchain.append(getos.GetPlatform()) 309 options.toolchain.append(getos.GetPlatform())
301 Trace('Adding platform: ' + getos.GetPlatform()) 310 Trace('Adding platform: ' + getos.GetPlatform())
302 311
303 ValidateToolchains(options.toolchain) 312 ValidateToolchains(options.toolchain)
304 313
305 filters = {} 314 filters = {}
306 if options.toolchain: 315 if options.toolchain:
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 348
340 349
341 if __name__ == '__main__': 350 if __name__ == '__main__':
342 script_name = os.path.basename(sys.argv[0]) 351 script_name = os.path.basename(sys.argv[0])
343 try: 352 try:
344 sys.exit(main(sys.argv[1:])) 353 sys.exit(main(sys.argv[1:]))
345 except parse_dsc.ValidationError as e: 354 except parse_dsc.ValidationError as e:
346 buildbot_common.ErrorExit('%s: %s' % (script_name, e)) 355 buildbot_common.ErrorExit('%s: %s' % (script_name, e))
347 except KeyboardInterrupt: 356 except KeyboardInterrupt:
348 buildbot_common.ErrorExit('%s: interrupted' % script_name) 357 buildbot_common.ErrorExit('%s: interrupted' % script_name)
OLDNEW
« no previous file with comments | « native_client_sdk/src/BUILDING.rst ('k') | native_client_sdk/src/build_tools/build_sdk.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698