blob: d5a3cfb1fc20dd15761dcb01d15d1a8bf00c1351 [file]
# Copyright 2022 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.
# LINT.IfChange(bazel_topdir_config_file)
# Location of the bazel top directory that contains the workspace
# and output_base directories, relative to the Ninja output directory.
# See //build/bazel/config/README.md.
#
bazel_top_dir_rebased =
read_file("//build/bazel/config/bazel_top_dir", "trim string")
# LINT.ThenChange(//build/bazel/scripts/build_utils.py:bazel_topdir_config_file,//build/bazel_sdk/bazel_rules_fuchsia/common/fuchsia_platform_build.bzl:bazel_topdir_config_file,//tools/devshell/lib/bazel_utils.sh)
# The Bazel main top directory, as a GN path (e.g. `//out/default/bazel`)
# derived from bazel_top_dir_rebased.
bazel_top_dir = "//" + rebase_path(bazel_top_dir_rebased, "//", root_build_dir)
# Location of the bazel launcher script, relative to the source root
bazel_launcher = bazel_top_dir + "/bazel"
# Location of the Bazel workspace, relative to the source root.
bazel_workspace_dir = bazel_top_dir + "/workspace"
# Location of the Bazel output base, relative to the source root.
bazel_output_base = bazel_top_dir + "/output_base"
# Location of the Bazel execroot, relative to the source root.
bazel_execroot = bazel_output_base + "/execroot/_main"