1# Copyright 2023 The Chromium Authors 2# Use of this source code is governed by a BSD-style license that can be 3# found in the LICENSE file. 4 5assert(is_fuchsia) 6 7declare_args() { 8 # The target API level for this repository. Embedders should override this 9 # value to specify the API level the packages produced from this repository 10 # should be targeting, e.g. in their top-level //.gn file. A value of -1 11 # means that no API level will be passed to the tools that consumes it. 12 fuchsia_target_api_level = 12 13 14 # Path to the fuchsia SDK. This is intended for use in other templates & 15 # rules to reference the contents of the fuchsia SDK. 16 fuchsia_sdk = "//third_party/fuchsia-sdk/sdk" 17 18 # ID uniquely identifying the Fuchsia IDK build. This is exposed as a 19 # property so it can be used to locate images and packages on GCS and 20 # as a marker to indicate the "version" of the IDK. 21 # Defaults to the id found in the manifest.json file of the SDK. 22 fuchsia_sdk_id = "" 23} 24 25declare_args() { 26 # The SDK manifest file. This is useful to include as a dependency 27 # for some targets in order to cause a rebuild when the version of the 28 # SDK is changed. 29 fuchsia_sdk_manifest_file = "$fuchsia_sdk/meta/manifest.json" 30 31 # fuchsia_tool_dir is used to specify the directory in the SDK to locate 32 # tools for the host cpu architecture. If the host_cpu is not recognized, 33 # then tool dir defaults to x64. 34 fuchsia_tool_dir = "${fuchsia_sdk}/tools/x64" 35 if (host_cpu == "arm64") { 36 fuchsia_tool_dir = "${fuchsia_sdk}/tools/arm64" 37 } 38} 39 40if (fuchsia_sdk_id == "") { 41 # Note: If we need to expose more than just the id in the future, 42 # we should consider exposing the entire json object for the metadata vs. 43 # adding a bunch of variables. 44 _meta = read_file(fuchsia_sdk_manifest_file, "json") 45 fuchsia_sdk_id = _meta.id 46} 47 48declare_args() { 49 # Specify a readelf_exec path to use. If not specified, the host's system 50 # executable will be used. Passed to populate_build_id_dir.py and 51 # prepare_package_inputs.py via the --readelf-exec flag. 52 # Must be a GN path (not an absolute path) since it is adjusted with 53 # rebase_path(). 54 if (!defined(fuchsia_sdk_readelf_exec)) { 55 fuchsia_sdk_readelf_exec = "" 56 } 57} 58