OLD | NEW |
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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 buildbot_common.ErrorExit('Unknown architecture %s.' % arch) | 122 buildbot_common.ErrorExit('Unknown architecture %s.' % arch) |
123 return os.path.join(tcpath, 'lib-' + arch) | 123 return os.path.join(tcpath, 'lib-' + arch) |
124 | 124 |
125 | 125 |
126 def GetBuildArgs(tcname, tcpath, outdir, arch, xarch=None): | 126 def GetBuildArgs(tcname, tcpath, outdir, arch, xarch=None): |
127 """Return list of scons build arguments to generate user libraries.""" | 127 """Return list of scons build arguments to generate user libraries.""" |
128 scons = GetScons() | 128 scons = GetScons() |
129 mode = '--mode=opt-host,nacl' | 129 mode = '--mode=opt-host,nacl' |
130 arch_name = GetArchName(arch, xarch) | 130 arch_name = GetArchName(arch, xarch) |
131 plat = 'platform=' + arch_name | 131 plat = 'platform=' + arch_name |
132 bin = 'bindir=' + os.path.join(outdir, 'tools') | 132 binarg = 'bindir=' + os.path.join(outdir, 'tools') |
133 lib = 'libdir=' + GetToolchainNaClLib(tcname, tcpath, arch, xarch) | 133 lib = 'libdir=' + GetToolchainNaClLib(tcname, tcpath, arch, xarch) |
134 args = [scons, mode, plat, bin, lib, '-j10', | 134 args = [scons, mode, plat, binarg, lib, '-j10', |
135 'install_bin', 'install_lib'] | 135 'install_bin', 'install_lib'] |
136 if tcname == 'glibc': | 136 if tcname == 'glibc': |
137 args.append('--nacl_glibc') | 137 args.append('--nacl_glibc') |
138 | 138 |
139 if tcname == 'pnacl': | 139 if tcname == 'pnacl': |
140 args.append('bitcode=1') | 140 args.append('bitcode=1') |
141 | 141 |
142 print "Building %s (%s): %s" % (tcname, arch, ' '.join(args)) | 142 print "Building %s (%s): %s" % (tcname, arch, ' '.join(args)) |
143 return args | 143 return args |
144 | 144 |
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
303 os.path.join(ppapi, 'utility', 'graphics')) | 303 os.path.join(ppapi, 'utility', 'graphics')) |
304 buildbot_common.CopyDir( | 304 buildbot_common.CopyDir( |
305 os.path.join(PPAPI_DIR, 'utility', 'threading', '*.h'), | 305 os.path.join(PPAPI_DIR, 'utility', 'threading', '*.h'), |
306 os.path.join(ppapi, 'utility', 'threading')) | 306 os.path.join(ppapi, 'utility', 'threading')) |
307 buildbot_common.CopyDir( | 307 buildbot_common.CopyDir( |
308 os.path.join(PPAPI_DIR, 'utility', 'websocket', '*.h'), | 308 os.path.join(PPAPI_DIR, 'utility', 'websocket', '*.h'), |
309 os.path.join(ppapi, 'utility', 'websocket')) | 309 os.path.join(ppapi, 'utility', 'websocket')) |
310 | 310 |
311 # Copy in the gles2 headers | 311 # Copy in the gles2 headers |
312 buildbot_common.MakeDir(os.path.join(ppapi, 'gles2')) | 312 buildbot_common.MakeDir(os.path.join(ppapi, 'gles2')) |
313 buildbot_common.CopyDir(os.path.join(PPAPI_DIR,'lib','gl','gles2','*.h'), | 313 buildbot_common.CopyDir(os.path.join(PPAPI_DIR, 'lib', 'gl', 'gles2', '*.h'), |
314 os.path.join(ppapi, 'gles2')) | 314 os.path.join(ppapi, 'gles2')) |
315 | 315 |
316 # Copy the EGL headers | 316 # Copy the EGL headers |
317 buildbot_common.MakeDir(os.path.join(tc_dst_inc, 'EGL')) | 317 buildbot_common.MakeDir(os.path.join(tc_dst_inc, 'EGL')) |
318 buildbot_common.CopyDir( | 318 buildbot_common.CopyDir( |
319 os.path.join(PPAPI_DIR,'lib','gl','include','EGL', '*.h'), | 319 os.path.join(PPAPI_DIR, 'lib', 'gl', 'include', 'EGL', '*.h'), |
320 os.path.join(tc_dst_inc, 'EGL')) | 320 os.path.join(tc_dst_inc, 'EGL')) |
321 | 321 |
322 # Copy the GLES2 headers | 322 # Copy the GLES2 headers |
323 buildbot_common.MakeDir(os.path.join(tc_dst_inc, 'GLES2')) | 323 buildbot_common.MakeDir(os.path.join(tc_dst_inc, 'GLES2')) |
324 buildbot_common.CopyDir( | 324 buildbot_common.CopyDir( |
325 os.path.join(PPAPI_DIR,'lib','gl','include','GLES2', '*.h'), | 325 os.path.join(PPAPI_DIR, 'lib', 'gl', 'include', 'GLES2', '*.h'), |
326 os.path.join(tc_dst_inc, 'GLES2')) | 326 os.path.join(tc_dst_inc, 'GLES2')) |
327 | 327 |
328 # Copy the KHR headers | 328 # Copy the KHR headers |
329 buildbot_common.MakeDir(os.path.join(tc_dst_inc, 'KHR')) | 329 buildbot_common.MakeDir(os.path.join(tc_dst_inc, 'KHR')) |
330 buildbot_common.CopyDir( | 330 buildbot_common.CopyDir( |
331 os.path.join(PPAPI_DIR,'lib','gl','include','KHR', '*.h'), | 331 os.path.join(PPAPI_DIR, 'lib', 'gl', 'include', 'KHR', '*.h'), |
332 os.path.join(tc_dst_inc, 'KHR')) | 332 os.path.join(tc_dst_inc, 'KHR')) |
333 | 333 |
334 # Copy the lib files | 334 # Copy the lib files |
335 buildbot_common.CopyDir(os.path.join(PPAPI_DIR,'lib'), | 335 buildbot_common.CopyDir(os.path.join(PPAPI_DIR, 'lib'), |
336 os.path.join(tc_dst_inc, 'ppapi')) | 336 os.path.join(tc_dst_inc, 'ppapi')) |
337 | 337 |
338 | 338 |
339 def BuildStepBuildToolchains(pepperdir, platform, arch, pepper_ver, toolchains): | 339 def BuildStepBuildToolchains(pepperdir, platform, arch, pepper_ver, toolchains): |
340 buildbot_common.BuildStep('SDK Items') | 340 buildbot_common.BuildStep('SDK Items') |
341 | 341 |
342 tcname = platform + '_' + arch | 342 tcname = platform + '_' + arch |
343 newlibdir = os.path.join(pepperdir, 'toolchain', tcname + '_newlib') | 343 newlibdir = os.path.join(pepperdir, 'toolchain', tcname + '_newlib') |
344 glibcdir = os.path.join(pepperdir, 'toolchain', tcname + '_glibc') | 344 glibcdir = os.path.join(pepperdir, 'toolchain', tcname + '_glibc') |
345 pnacldir = os.path.join(pepperdir, 'toolchain', tcname + '_pnacl') | 345 pnacldir = os.path.join(pepperdir, 'toolchain', tcname + '_pnacl') |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
391 def BuildStepCopyBuildHelpers(pepperdir, platform): | 391 def BuildStepCopyBuildHelpers(pepperdir, platform): |
392 buildbot_common.BuildStep('Copy build helpers') | 392 buildbot_common.BuildStep('Copy build helpers') |
393 buildbot_common.CopyDir(os.path.join(SDK_SRC_DIR, 'tools', '*.py'), | 393 buildbot_common.CopyDir(os.path.join(SDK_SRC_DIR, 'tools', '*.py'), |
394 os.path.join(pepperdir, 'tools')) | 394 os.path.join(pepperdir, 'tools')) |
395 if platform == 'win': | 395 if platform == 'win': |
396 buildbot_common.BuildStep('Add MAKE') | 396 buildbot_common.BuildStep('Add MAKE') |
397 http_download.HttpDownload(GSTORE + MAKE, | 397 http_download.HttpDownload(GSTORE + MAKE, |
398 os.path.join(pepperdir, 'tools' ,'make.exe')) | 398 os.path.join(pepperdir, 'tools' ,'make.exe')) |
399 rename_list = ['ncval_x86_32', 'ncval_x86_64', | 399 rename_list = ['ncval_x86_32', 'ncval_x86_64', |
400 'sel_ldr_x86_32', 'sel_ldr_x86_64'] | 400 'sel_ldr_x86_32', 'sel_ldr_x86_64'] |
401 tools = os.path.join(pepperdir, 'tools') | |
402 for name in rename_list: | 401 for name in rename_list: |
403 src = os.path.join(pepperdir, 'tools', name) | 402 src = os.path.join(pepperdir, 'tools', name) |
404 dst = os.path.join(pepperdir, 'tools', name + '.exe') | 403 dst = os.path.join(pepperdir, 'tools', name + '.exe') |
405 buildbot_common.Move(src, dst) | 404 buildbot_common.Move(src, dst) |
406 | 405 |
407 | 406 |
408 EXAMPLE_LIST = [ | 407 EXAMPLE_LIST = [ |
409 'debugging', | 408 'debugging', |
410 'file_histogram', | 409 'file_histogram', |
411 'file_io', | 410 'file_io', |
412 'fullscreen_tumbler', | 411 'fullscreen_tumbler', |
413 'gamepad', | 412 'gamepad', |
414 'geturl', | 413 'geturl', |
415 'hello_world_interactive', | 414 'hello_world_interactive', |
(...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
832 # Archive on non-trybots. | 831 # Archive on non-trybots. |
833 if options.archive or buildbot_common.IsSDKBuilder(): | 832 if options.archive or buildbot_common.IsSDKBuilder(): |
834 BuildStepArchiveBundle(pepper_ver, clnumber, tarfile) | 833 BuildStepArchiveBundle(pepper_ver, clnumber, tarfile) |
835 BuildStepArchiveSDKTools() | 834 BuildStepArchiveSDKTools() |
836 | 835 |
837 return 0 | 836 return 0 |
838 | 837 |
839 | 838 |
840 if __name__ == '__main__': | 839 if __name__ == '__main__': |
841 sys.exit(main(sys.argv)) | 840 sys.exit(main(sys.argv)) |
OLD | NEW |