diff options
author | noelallen@chromium.org <noelallen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-04-30 18:57:06 +0000 |
---|---|---|
committer | noelallen@chromium.org <noelallen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-04-30 18:57:06 +0000 |
commit | fc9f7ac703abb978dad1223f4663f25ace944307 (patch) | |
tree | 2bdb521189033080a69529fde8e02b2195c4a4d2 /native_client_sdk | |
parent | ecc4d3b3f6f131387b8c0e01598a702a09e259d9 (diff) | |
download | chromium_src-fc9f7ac703abb978dad1223f4663f25ace944307.zip chromium_src-fc9f7ac703abb978dad1223f4663f25ace944307.tar.gz chromium_src-fc9f7ac703abb978dad1223f4663f25ace944307.tar.bz2 |
Add switch to build NaCl SDK with bionic from NaCl Checkout instead of downloading .tgz
Adds switch to specify a path to a NaCl checkout used to build the
bionic toolchain. This allows the SDK build script to copy the
output from the NaCl checkout instead of downloading and untarring
the raw bionic toolchain.
BUG=none
R=sbc@chromium.org, binji@chromium.org
Review URL: https://codereview.chromium.org/259393004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@267281 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'native_client_sdk')
-rwxr-xr-x | native_client_sdk/src/build_tools/build_sdk.py | 34 |
1 files changed, 33 insertions, 1 deletions
diff --git a/native_client_sdk/src/build_tools/build_sdk.py b/native_client_sdk/src/build_tools/build_sdk.py index fdebfed..d06c7e6 100755 --- a/native_client_sdk/src/build_tools/build_sdk.py +++ b/native_client_sdk/src/build_tools/build_sdk.py @@ -897,6 +897,9 @@ def BuildStepBuildAppEngine(pepperdir, chrome_revision): def main(args): parser = optparse.OptionParser(description=__doc__) + parser.add_option('--nacl-tree-path', + help='Path to native client tree for bionic build.', + dest='nacl_tree_path') parser.add_option('--qemu', help='Add qemu for ARM.', action='store_true') parser.add_option('--bionic', help='Add bionic build.', @@ -933,6 +936,26 @@ def main(args): if args: parser.error("Unexpected arguments: %s" % str(args)) + if options.nacl_tree_path: + options.bionic = True + toolchain_build = os.path.join(options.nacl_tree_path, 'toolchain_build') + print 'WARNING: Building bionic toolchain from NaCl checkout.' + print 'This option builds bionic in a NativeClient checkout and uses the' + print 'results instead of downloading a toolchain from the builder.' + print 'This may result in a NaCl SDK that can not run on ToT chrome.' + print '' + response = raw_input("Type 'y' and hit enter to continue.\n") + if response != 'y' and response != 'Y': + print 'Aborting.' + return 1 + + # Get head version of NativeClient tree + buildbot_common.BuildStep('Build bionic toolchain.') + buildbot_common.Run([sys.executable, 'toolchain_build_bionic.py'], + cwd=toolchain_build) + else: + toolchain_build = None + if buildbot_common.IsSDKBuilder(): options.archive = True options.build_ports = True @@ -978,7 +1001,16 @@ def main(args): BuildStepCleanPepperDirs(pepperdir, pepperdir_old) BuildStepMakePepperDirs(pepperdir, ['include', 'toolchain', 'tools']) BuildStepDownloadToolchains(toolchains) - BuildStepUntarToolchains(pepperdir, toolchains) + if options.nacl_tree_path: + # Instead of untarring, copy the raw bionic toolchain + not_bionic = [i for i in toolchains if i != 'bionic'] + BuildStepUntarToolchains(pepperdir, not_bionic) + tcname = GetToolchainDirName('bionic', 'arm') + srcdir = os.path.join(toolchain_build, 'out', tcname) + bionicdir = os.path.join(pepperdir, 'toolchain', tcname) + oshelpers.Copy(['-r', srcdir, bionicdir]) + else: + BuildStepUntarToolchains(pepperdir, toolchains) BuildStepBuildToolchains(pepperdir, toolchains) BuildStepUpdateHelpers(pepperdir, True) |