This repository has been archived by the owner on Aug 20, 2024. It is now read-only.
forked from bazel-ios/rules_ios
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.bazelrc
58 lines (44 loc) · 2.69 KB
/
.bazelrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# We can't create a bzl_library for rules-swift because of its visibility,
# so circumvent by not using the sandbox
build --strategy=Stardoc=standalone
# Debugging does not work in sandbox mode. Uncomment these lines to turn off sandboxing.
# build --genrule_strategy=standalone
# build --spawn_strategy=standalone
build --verbose_failures # Print the full command line for commands that failed
build --test_output=errors # Prints log file output to the console on failure
# By default do not build the tests for sources-with-prebuilt-binaries,
# because it takes quite some time. They will only run on CI
build --deleted_packages tests/ios/frameworks/sources-with-prebuilt-binaries
# Enable dbg compilation mode in this repo, so we can test xcodeproj-built
# binaries contain debug symbol tables.
build --compilation_mode=dbg
# Use 'worker' strategy for swift compilation
build --strategy=SwiftCompile=worker
build --experimental_worker_allow_json_protocol
# This flips enable_global_index_store - see docs/index_while_building.md for a
# detailed summary
build --features swift.use_global_index_store
build --features swift.index_while_building
# Prevents leaking unexpected binaries via PATH to tests
build --test_env=PATH=/usr/bin:/bin:/usr/sbin:/sbin
# A toolchain to build the arm64 sim under Bazel 4. The problem is
# that Bazel should have a new CPU but that needs much work in Bazel. The idea of
# this toolchain is to conditionally compile x86_64 simulator as arm64. This has
# edge cases and cavates of course. These features could theoretically be
# auto-configured on an ARM64 host but is a flag for the moment. Example usage:
# Setup this config to build x86_64 as arm64 builds with ( --ios_multi_cpus=x86_64 )
common:bazel4_arm64_simulator_arm64_host --features apple.arm64_simulator_use_device_deps
common:bazel4_arm64_simulator_arm64_host --features bazel4.override_host_cpu_arm64
common:bazel4_arm64_simulator_arm64_host --features bazel4.override_simulator_cpu_arm64
# Similar to above but doesn't override the host CPU
common:bazel4_arm64_simulator_x86_64_host --features apple.arm64_simulator_use_device_deps
common:bazel4_arm64_simulator_x86_64_host --features bazel4.override_simulator_cpu_arm64
# Broken on Intel + Bazel 5 so turnoff
build --deleted_packages tools/toolchains/bazel4_local_config_cc
# Enable device deps when the build matches the arm64 simulator
# Bazel 5 - matches ios_sim_arm64 CPU, Bazel 4 - needs "override" flags
build --features apple.arm64_simulator_use_device_deps
# Note - tree artifacts needs to be on
build:lldb_ios_test --spawn_strategy=standalone --apple_platform_type=ios --define=apple.experimental.tree_artifact_outputs=1
# Load a user.bazelrc
try-import %workspace%/user.bazelrc