Commit abf6981f authored by Kevin Marshall's avatar Kevin Marshall Committed by Commit Bot

[fuchsia] Bring local-sdk.py up to date with Fuchsia SDK build process.

makesdk.go was deprecated and removed; use artifact tarballs generated
from the supported GN/ninja-based SDK build methods instead.

Change-Id: I6c3e3eb38451f2d0fbfc8940f3c4d4b5c6e89fef
Reviewed-on: https://chromium-review.googlesource.com/1237534Reviewed-by: default avatarScott Graham <scottmg@chromium.org>
Commit-Queue: Kevin Marshall <kmarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#593731}
parent 506d933c
......@@ -34,29 +34,34 @@ def EnsureEmptyDir(path):
def BuildForArch(arch):
build_dir = 'out/release-' + arch
Run('scripts/fx', 'set', arch,
'--packages=topaz/packages/sdk/topaz',
'--args=is_debug=false', build_dir)
'--packages=garnet/packages/sdk/garnet',
'--args=is_debug=false', '--args=build_sdk_archives=true', build_dir)
Run('scripts/fx', 'full-build')
def main(args):
if len(args) != 1 or not os.path.isdir(args[0]):
print 'usage: %s <path_to_fuchsia_tree>' % SELF_FILE
if len(args) == 0 or len(args) > 2 or not os.path.isdir(args[0]):
print """usage: %s <path_to_fuchsia_tree> [architecture]""" % SELF_FILE
return 1
original_dir = os.getcwd()
fuchsia_root = args[0]
arch = args[1] if len(args) > 1 else 'x64'
if arch not in ['x64', 'arm64']:
print 'Unknown architecture: ' + arch
print 'Must be "x64" or "arm64".'
return 1
# Switch to the Fuchsia tree and build an SDK.
os.chdir(fuchsia_root)
BuildForArch('x64')
BuildForArch('arm64')
BuildForArch(arch)
tempdir = tempfile.mkdtemp()
sdk_tar = os.path.join(tempdir, 'fuchsia-sdk.tgz')
Run('go', 'run', 'scripts/sdk/foundation/makesdk.go', '-output', sdk_tar, '.')
sdk_tar = os.path.join(fuchsia_root, 'out', 'release-' + arch, 'sdk',
'garnet.tar.gz')
# Nuke the SDK from DEPS, put our just-built one there, and set a fake .hash
# file. This means that on next gclient runhooks, we'll restore to the
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment