blob: 05a615409457e6e680b321360e3325e7aa82ac04 [file] [log] [blame]
#!/usr/bin/env bash
# Copyright 2021 The Fuchsia Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
set -euxo pipefail
if [ ! -x "$FUCHSIA_BUILD_DIR" ]; then
echo "error: did you fx exec? missing \$FUCHSIA_BUILD_DIR" 1>&2
exit 1
fi
fx ninja -C "$FUCHSIA_BUILD_DIR" host_x64/gen/third_party/go/makefuchsia.stamp
"$FUCHSIA_BUILD_DIR"/host-tools/goroot/bin/go tool api | \
grep -e '^pkg syscall/zx' > "$FUCHSIA_DIR"/third_party/go/api/fuchsia.txt