blob: eb678951251061db508a7cb6c4f12214ea93bcc8 [file] [log] [blame]
#!/bin/bash
# Copyright 2020 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.
#### CATEGORY=Run, inspect and debug
### Code size attribution on binaries from the system image
set -eo pipefail
source "$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"/../lib/vars.sh || exit $?
fx-config-read
# Merge our package config with the one in third_party/dart-pkg/pub
fx-command-run merge-package-config \
--first "$FUCHSIA_DIR/third_party/dart-pkg/pub/package_config.json" \
--second "${FUCHSIA_DIR}/scripts/codesize/.dart_tool/package_config.json" \
--out "${FUCHSIA_BUILD_DIR}/codesize.package_config.json"
exec "${PREBUILT_DART_DIR}/bin/dart" \
--enable-experiment=non-nullable --no-sound-null-safety \
--packages="${FUCHSIA_BUILD_DIR}/codesize.package_config.json" \
"${FUCHSIA_DIR}/scripts/codesize/bin/main.dart" "$@"