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

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

Issue 2353683003: [NaCl SDK] Re-enable 32-bit sel_ldr build for mac (Closed)
Patch Set: . Created 4 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 | « chrome/BUILD.gn ('k') | native_client_sdk/src/build_tools/sdk_files.list » ('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) 2012 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2012 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 """Entry point for both build and try bots. 6 """Entry point for both build and try bots.
7 7
8 This script is invoked from XXX, usually without arguments 8 This script is invoked from XXX, usually without arguments
9 to package an SDK. It automatically determines whether 9 to package an SDK. It automatically determines whether
10 this SDK is for mac, win, linux. 10 this SDK is for mac, win, linux.
(...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after
363 tools_dir = os.path.join(pepperdir, 'tools') 363 tools_dir = os.path.join(pepperdir, 'tools')
364 buildbot_common.MakeDir(tools_dir) 364 buildbot_common.MakeDir(tools_dir)
365 365
366 # Add .exe extensions to all windows tools 366 # Add .exe extensions to all windows tools
367 for pair in tools_files_x86 + tools_files_x64: 367 for pair in tools_files_x86 + tools_files_x64:
368 if platform == 'win' and not os.path.splitext(pair[0])[1]: 368 if platform == 'win' and not os.path.splitext(pair[0])[1]:
369 pair[0] += '.exe' 369 pair[0] += '.exe'
370 pair[1] += '.exe' 370 pair[1] += '.exe'
371 371
372 InstallFiles(GetNinjaOutDir('x64'), tools_dir, tools_files_x64) 372 InstallFiles(GetNinjaOutDir('x64'), tools_dir, tools_files_x64)
373 if platform != 'mac': 373 InstallFiles(GetNinjaOutDir('x86'), tools_dir, tools_files_x86)
374 InstallFiles(GetNinjaOutDir('x86'), tools_dir, tools_files_x86)
375 if platform == 'linux': 374 if platform == 'linux':
376 InstallFiles(GetNinjaOutDir('arm'), tools_dir, tools_files_arm) 375 InstallFiles(GetNinjaOutDir('arm'), tools_dir, tools_files_arm)
377 376
378 stub_dir = os.path.join(SRC_DIR, 'ppapi/native_client/src/untrusted/irt_stub') 377 stub_dir = os.path.join(SRC_DIR, 'ppapi/native_client/src/untrusted/irt_stub')
379 for tc in toolchains: 378 for tc in toolchains:
380 if tc in ('host', 'clang-newlib'): 379 if tc in ('host', 'clang-newlib'):
381 continue 380 continue
382 elif tc == 'pnacl': 381 elif tc == 'pnacl':
383 xarches = ('pnacl', 'x86', 'x64', 'arm') 382 xarches = ('pnacl', 'x86', 'x64', 'arm')
384 elif tc in ('x86_glibc'): 383 elif tc in ('x86_glibc'):
(...skipping 11 matching lines...) Expand all
396 InstallFiles(src_dir, dst_dir, ['libppapi_stub.a']) 395 InstallFiles(src_dir, dst_dir, ['libppapi_stub.a'])
397 InstallFiles(stub_dir, dst_dir, ['libppapi.a']) 396 InstallFiles(stub_dir, dst_dir, ['libppapi.a'])
398 if 'glibc' in tc: 397 if 'glibc' in tc:
399 InstallFiles(stub_dir, dst_dir, ['libppapi.so']) 398 InstallFiles(stub_dir, dst_dir, ['libppapi.so'])
400 399
401 400
402 def GnNinjaBuildAll(rel_out_dir): 401 def GnNinjaBuildAll(rel_out_dir):
403 def MakeNinjaRelPath(suffix): 402 def MakeNinjaRelPath(suffix):
404 return os.path.join(os.path.relpath(OUT_DIR, SRC_DIR), rel_out_dir + suffix) 403 return os.path.join(os.path.relpath(OUT_DIR, SRC_DIR), rel_out_dir + suffix)
405 404
406 platform = getos.GetPlatform() 405 GnNinjaBuild('x64', MakeNinjaRelPath('-x64'), ['nacl_sdk_untrusted=true'])
406 GnNinjaBuild('x86', MakeNinjaRelPath('-x86'))
407 407
408 GnNinjaBuild('x64', MakeNinjaRelPath('-x64'), 408 if getos.GetPlatform() == 'linux':
409 ['nacl_sdk_untrusted=true'])
410 if platform != 'mac':
411 GnNinjaBuild('x86', MakeNinjaRelPath('-x86'))
412
413 if platform == 'linux':
414 GnNinjaBuild('arm', MakeNinjaRelPath('-arm')) 409 GnNinjaBuild('arm', MakeNinjaRelPath('-arm'))
415 410
416 411
417 def GetGNExecutable(platform): 412 def GetGNExecutable(platform):
418 # TODO(sbc): Remove this code, which is duplicated from mb.py and simply 413 # TODO(sbc): Remove this code, which is duplicated from mb.py and simply
419 # rely on the depot_tools gn wrapper which should be in the PATH. 414 # rely on the depot_tools gn wrapper which should be in the PATH.
420 # http://crbug.com/588794 415 # http://crbug.com/588794
421 if platform == 'linux': 416 if platform == 'linux':
422 subdir, exe = 'linux64', 'gn' 417 subdir, exe = 'linux64', 'gn'
423 elif platform == 'mac': 418 elif platform == 'mac':
424 subdir, exe = 'mac', 'gn' 419 subdir, exe = 'mac', 'gn'
425 else: 420 else:
426 subdir, exe = 'win', 'gn.exe' 421 subdir, exe = 'win', 'gn.exe'
427 return os.path.join(SRC_DIR, 'buildtools', subdir, exe) 422 return os.path.join(SRC_DIR, 'buildtools', subdir, exe)
428 423
429 424
430 def GnNinjaBuild(arch, out_dir, extra_gn_args=None): 425 def GnNinjaBuild(arch, out_dir, extra_gn_args=None):
431 gn_args = ['is_debug=false'] 426 gn_args = ['is_debug=false']
432 if extra_gn_args is not None: 427 if extra_gn_args is not None:
433 gn_args += extra_gn_args 428 gn_args += extra_gn_args
434 platform = getos.GetPlatform() 429 platform = getos.GetPlatform()
435 if platform == 'mac': 430 if platform == 'mac':
436 if options.mac_sdk: 431 if options.mac_sdk:
437 gn_args.append('mac_sdk_min="%s"' % options.mac_sdk) 432 gn_args.append('mac_sdk_min="%s"' % options.mac_sdk)
438 # Without this the target_cpu='arm' build complains about missing code 433 if arch == 'arm':
439 # signing identity 434 # Without this the target_cpu='arm' build complains about missing code
440 gn_args.append('use_ios_simulator=true') 435 # signing identity
436 gn_args.append('use_ios_simulator=true')
441 437
442 gn_exe = GetGNExecutable(platform) 438 gn_exe = GetGNExecutable(platform)
443 439
444 if arch is not None: 440 if arch is not None:
445 gn_args.append('target_cpu="%s"' % arch) 441 gn_args.append('target_cpu="%s"' % arch)
446 if arch == 'arm': 442 if arch == 'arm':
447 if options.no_arm_trusted: 443 if options.no_arm_trusted:
448 gn_args.append('enable_cross_trusted=false') 444 gn_args.append('enable_cross_trusted=false')
449 445
450 gn_args = ' '.join(gn_args) 446 gn_args = ' '.join(gn_args)
(...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after
876 #BuildStepArchivePNaClComponent(chrome_revision) 872 #BuildStepArchivePNaClComponent(chrome_revision)
877 873
878 return 0 874 return 0
879 875
880 876
881 if __name__ == '__main__': 877 if __name__ == '__main__':
882 try: 878 try:
883 sys.exit(main(sys.argv[1:])) 879 sys.exit(main(sys.argv[1:]))
884 except KeyboardInterrupt: 880 except KeyboardInterrupt:
885 buildbot_common.ErrorExit('build_sdk: interrupted') 881 buildbot_common.ErrorExit('build_sdk: interrupted')
OLDNEW
« no previous file with comments | « chrome/BUILD.gn ('k') | native_client_sdk/src/build_tools/sdk_files.list » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698