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

Side by Side Diff: toolchain_build/toolchain_build_pnacl.py

Issue 296053008: Build subzero with LLVM autoconf build (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: update to tip Created 6 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « pnacl/COMPONENT_REVISIONS ('k') | no next file » | 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/python 1 #!/usr/bin/python
2 # Copyright (c) 2013 The Native Client Authors. All rights reserved. 2 # Copyright (c) 2013 The Native Client 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 """Recipes for PNaCl toolchain packages. 6 """Recipes for PNaCl toolchain packages.
7 7
8 Recipes consist of specially-structured dictionaries, with keys for package 8 Recipes consist of specially-structured dictionaries, with keys for package
9 name, type, commands to execute, etc. The structure is documented in the 9 name, type, commands to execute, etc. The structure is documented in the
10 PackageBuilder docstring in toolchain_main.py. 10 PackageBuilder docstring in toolchain_main.py.
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 GIT_REPOS = { 50 GIT_REPOS = {
51 'binutils': 'nacl-binutils.git', 51 'binutils': 'nacl-binutils.git',
52 'clang': 'pnacl-clang.git', 52 'clang': 'pnacl-clang.git',
53 'llvm': 'pnacl-llvm.git', 53 'llvm': 'pnacl-llvm.git',
54 'gcc': 'pnacl-gcc.git', 54 'gcc': 'pnacl-gcc.git',
55 'libcxx': 'pnacl-libcxx.git', 55 'libcxx': 'pnacl-libcxx.git',
56 'libcxxabi': 'pnacl-libcxxabi.git', 56 'libcxxabi': 'pnacl-libcxxabi.git',
57 'nacl-newlib': 'nacl-newlib.git', 57 'nacl-newlib': 'nacl-newlib.git',
58 'llvm-test-suite': 'pnacl-llvm-testsuite.git', 58 'llvm-test-suite': 'pnacl-llvm-testsuite.git',
59 'compiler-rt': 'pnacl-compiler-rt.git', 59 'compiler-rt': 'pnacl-compiler-rt.git',
60 'subzero': 'pnacl-subzero.git',
60 } 61 }
61 62
62 GIT_BASE_URL = 'https://chromium.googlesource.com/native_client/' 63 GIT_BASE_URL = 'https://chromium.googlesource.com/native_client/'
63 GIT_PUSH_URL = 'ssh://gerrit.chromium.org/native_client/' 64 GIT_PUSH_URL = 'ssh://gerrit.chromium.org/native_client/'
64 GIT_DEPS_FILE = os.path.join(NACL_DIR, 'pnacl', 'COMPONENT_REVISIONS') 65 GIT_DEPS_FILE = os.path.join(NACL_DIR, 'pnacl', 'COMPONENT_REVISIONS')
65 66
66 ALT_GIT_BASE_URL = 'https://chromium.googlesource.com/a/native_client/' 67 ALT_GIT_BASE_URL = 'https://chromium.googlesource.com/a/native_client/'
67 68
68 KNOWN_MIRRORS = [('http://git.chromium.org/native_client/', GIT_BASE_URL)] 69 KNOWN_MIRRORS = [('http://git.chromium.org/native_client/', GIT_BASE_URL)]
69 PUSH_MIRRORS = [('http://git.chromium.org/native_client/', GIT_PUSH_URL), 70 PUSH_MIRRORS = [('http://git.chromium.org/native_client/', GIT_PUSH_URL),
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 'clang_src': { 260 'clang_src': {
260 'type': 'source', 261 'type': 'source',
261 'output_dirname': 'clang', 262 'output_dirname': 'clang',
262 'commands': GetGitSyncCmds('clang'), 263 'commands': GetGitSyncCmds('clang'),
263 }, 264 },
264 'llvm_src': { 265 'llvm_src': {
265 'type': 'source', 266 'type': 'source',
266 'output_dirname': 'llvm', 267 'output_dirname': 'llvm',
267 'commands': GetGitSyncCmds('llvm'), 268 'commands': GetGitSyncCmds('llvm'),
268 }, 269 },
270 'subzero_src': {
271 'type': 'source',
272 'output_dirname': 'subzero',
273 'commands': GetGitSyncCmds('subzero'),
274 },
269 } 275 }
270 return sources 276 return sources
271 277
272 278
273 def TestsuiteSources(GetGitSyncCmds): 279 def TestsuiteSources(GetGitSyncCmds):
274 sources = { 280 sources = {
275 'llvm_testsuite_src': { 281 'llvm_testsuite_src': {
276 'type': 'source', 282 'type': 'source',
277 'output_dirname': 'llvm-test-suite', 283 'output_dirname': 'llvm-test-suite',
278 'commands': GetGitSyncCmds('llvm-test-suite'), 284 'commands': GetGitSyncCmds('llvm-test-suite'),
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
391 '-DLLVM_BINUTILS_INCDIR=%(abs_binutils_pnacl_src)s/include', 397 '-DLLVM_BINUTILS_INCDIR=%(abs_binutils_pnacl_src)s/include',
392 '-DLLVM_EXTERNAL_CLANG_SOURCE_DIR=%(clang_src)s', 398 '-DLLVM_EXTERNAL_CLANG_SOURCE_DIR=%(clang_src)s',
393 '%(llvm_src)s']), 399 '%(llvm_src)s']),
394 command.Command(['ninja', '-v']), 400 command.Command(['ninja', '-v']),
395 command.Command(['ninja', 'install']), 401 command.Command(['ninja', 'install']),
396 ], 402 ],
397 }, 403 },
398 } 404 }
399 llvm_autoconf = { 405 llvm_autoconf = {
400 H('llvm'): { 406 H('llvm'): {
401 'dependencies': ['clang_src', 'llvm_src', 'binutils_pnacl_src'], 407 'dependencies': ['clang_src', 'llvm_src', 'binutils_pnacl_src',
408 'subzero_src'],
402 'type': 'build', 409 'type': 'build',
403 'output_subdir': HostSubdir(host), 410 'output_subdir': HostSubdir(host),
404 'commands': [ 411 'commands': [
405 command.SkipForIncrementalCommand([ 412 command.SkipForIncrementalCommand([
406 'sh', 413 'sh',
407 '%(llvm_src)s/configure'] + 414 '%(llvm_src)s/configure'] +
408 ConfigureHostArchFlags(host) + 415 ConfigureHostArchFlags(host) +
409 LLVMConfigureAssertionsFlags(options) + 416 LLVMConfigureAssertionsFlags(options) +
410 ['--prefix=/', 417 ['--prefix=/',
411 '--enable-shared', 418 '--enable-shared',
412 '--disable-zlib', 419 '--disable-zlib',
413 '--disable-terminfo', 420 '--disable-terminfo',
414 '--disable-jit', 421 '--disable-jit',
415 '--disable-bindings', # ocaml is currently the only binding. 422 '--disable-bindings', # ocaml is currently the only binding.
416 '--with-binutils-include=%(abs_binutils_pnacl_src)s/include', 423 '--with-binutils-include=%(abs_binutils_pnacl_src)s/include',
417 '--enable-targets=x86,arm,mips', 424 '--enable-targets=x86,arm,mips',
418 '--program-prefix=', 425 '--program-prefix=',
419 '--enable-optimized', 426 '--enable-optimized',
420 '--with-clang-srcdir=%(abs_clang_src)s']), 427 '--with-clang-srcdir=%(abs_clang_src)s']),
421 command.Command(MakeCommand(host) + [ 428 command.Command(MakeCommand(host) + [
422 'VERBOSE=1', 429 'VERBOSE=1',
423 'NACL_SANDBOX=0', 430 'NACL_SANDBOX=0',
431 'SUBZERO_SRC_ROOT=%(abs_subzero_src)s',
424 'all']), 432 'all']),
425 command.Command(MAKE_DESTDIR_CMD + ['install']), 433 command.Command(MAKE_DESTDIR_CMD + ['install']),
426 command.Remove(*[os.path.join('%(output)s', 'lib', f) for f in 434 command.Remove(*[os.path.join('%(output)s', 'lib', f) for f in
427 '*.a', '*Hello.*', 'BugpointPasses.*']), 435 '*.a', '*Hello.*', 'BugpointPasses.*']),
428 command.Remove(*[os.path.join('%(output)s', 'bin', f) for f in 436 command.Remove(*[os.path.join('%(output)s', 'bin', f) for f in
429 Exe('clang-format'), Exe('clang-check'), 437 Exe('clang-format'), Exe('clang-check'),
430 Exe('c-index-test'), Exe('clang-tblgen'), 438 Exe('c-index-test'), Exe('clang-tblgen'),
431 Exe('llvm-tblgen')])] + 439 Exe('llvm-tblgen')])] +
432 CopyWindowsHostLibs(host), 440 CopyWindowsHostLibs(host),
433 }, 441 },
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
659 packages.update(Metadata()) 667 packages.update(Metadata())
660 if pynacl.platform.IsLinux() or pynacl.platform.IsMac(): 668 if pynacl.platform.IsLinux() or pynacl.platform.IsMac():
661 packages.update(pnacl_targetlibs.UnsandboxedIRT( 669 packages.update(pnacl_targetlibs.UnsandboxedIRT(
662 'x86-32-%s' % pynacl.platform.GetOS())) 670 'x86-32-%s' % pynacl.platform.GetOS()))
663 671
664 672
665 tb = toolchain_main.PackageBuilder(packages, 673 tb = toolchain_main.PackageBuilder(packages,
666 upload_packages, 674 upload_packages,
667 leftover_args) 675 leftover_args)
668 tb.Main() 676 tb.Main()
OLDNEW
« no previous file with comments | « pnacl/COMPONENT_REVISIONS ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698