blob: a4d7ff2530343b362a96fd690ff7d2334b270d20 [file] [log] [blame]
# Copyright 2018 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.
declare_args() {
# Directory containing prebuilt Dart SDK.
# This must have in its `bin/` subdirectory `gen_snapshot.OS-CPU` binaries.
# Set to empty for a local build.
prebuilt_dart_sdk = "//topaz/tools/prebuilt-dart-sdk/${host_platform}"
# Whether to use the prebuilt Dart SDK for everything.
# When setting this to false, the preubilt Dart SDK will not be used in
# situations where the version of the SDK matters, but may still be used as an
# optimization where the version does not matter.
use_prebuilt_dart_sdk = true
}
# For using the prebuilts even when use_prebuilt_dart_sdk is false.
prebuilt_dart = "${prebuilt_dart_sdk}/bin/dart"
prebuilt_gen_snapshot =
"${prebuilt_dart_sdk}/bin/gen_snapshot.${current_os}-${current_cpu}"
prebuilt_gen_snapshot_product =
"${prebuilt_dart_sdk}/bin/gen_snapshot_product.${current_os}-${current_cpu}"
if (use_prebuilt_dart_sdk) {
dart_sdk = "${prebuilt_dart_sdk}"
dart_sdk_deps = []
gen_snapshot = prebuilt_gen_snapshot
gen_snapshot_product = prebuilt_gen_snapshot_product
gen_snapshot_deps = []
} else {
_dart_sdk_label = "//third_party/dart:create_sdk($host_toolchain)"
dart_sdk = get_label_info(_dart_sdk_label, "root_out_dir") + "/dart-sdk"
dart_sdk_deps = [ _dart_sdk_label ]
_gen_snapshot_label =
"//third_party/dart/runtime/bin:gen_snapshot($host_toolchain)"
_gen_snapshot_product_label =
"//third_party/dart/runtime/bin:gen_snapshot_product($host_toolchain)"
gen_snapshot =
get_label_info(_gen_snapshot_label, "root_out_dir") + "/gen_snapshot"
gen_snapshot_product =
get_label_info(_gen_snapshot_product_label, "root_out_dir") +
"/gen_snapshot_product"
gen_snapshot_deps = [
_gen_snapshot_label,
_gen_snapshot_product_label,
]
}