blob: 716df7ebf5cdf96a22f306c96adedf7dbd03d8f4 [file] [log] [blame]
build:fuchsia_x64 --crosstool_top=@fuchsia_clang//:toolchain
build:fuchsia_x64 --cpu=x86_64
build:fuchsia_x64 --copt=--debug --strip=never
build:fuchsia_arm64 --crosstool_top=@fuchsia_clang//:toolchain
build:fuchsia_arm64 --cpu=aarch64
build:fuchsia_arm64 --copt=--debug --strip=never
build:fuchsia_riscv64 --crosstool_top=@fuchsia_clang//:toolchain
build:fuchsia_riscv64 --cpu=riscv64
build:fuchsia_riscv64 --copt=--debug --strip=never
# The @fuchsia_build_config//:host platform definition always
# matches the host os and cpu, which is very convenient to avoid
# a hard-coded --host_cpu=k8 flag in this file (which would not
# work on arm64-based Linux or MacOS machines).
#
# However, when --host_cpu is not defined, Bazel will try to
# auto-detect the host C++ toolchain, which will fail since
# this project doesn't define or even use one.
#
# The work-around is to force its value here to
# @bazel_tools//tools/cpp:toolchain even though it will be ignored
# later, due to the use of --host_platform.
#
# There is also no point in defining --host_copy or --host_strip
# since this project never builds host binaries from C++ sources.
#
build --host_platform=@fuchsia_build_config//:host
build --host_crosstool_top=@bazel_tools//tools/cpp:toolchain
# This flag is required to avoid conflicts at analysis time when
# testonly fuchsia_cc_test() targets depend on non-testonly
# cc_library() ones.
#
# For example, without the target at
# //fuchsia/packaging/fuchsia_package/cc_component:cc_test
# will be instantiated in two different build configurations that
# write their output to the same location, resulting in a conflict!
cquery --experimental_retain_test_configuration_across_testonly
aquery --experimental_retain_test_configuration_across_testonly
build --experimental_retain_test_configuration_across_testonly
build --flag_alias=override_fuchsia_api_level=@fuchsia_sdk//fuchsia:fuchsia_api_level
build --flag_alias=default_fuchsia_api_level=@fuchsia_sdk//fuchsia:repository_default_fuchsia_api_level
# This value determines what API level we compile our packages against when they
# do not specify it themselves.
build --default_fuchsia_api_level=15