Skip to content

Commit 7f3f252

Browse files
chore: Update docs for build fix on macOS (#491)
Via: bazel-contrib/toolchains_llvm#224 (comment) Seems weird that changing the spawn_strategy would change the dynamic linking done for binaries, but that seems to be the case. Removing `--spawn_strategy=local` makes the build work locally on macOS.
1 parent 0738e86 commit 7f3f252

File tree

2 files changed

+7
-17
lines changed

2 files changed

+7
-17
lines changed

docs/Development.md

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -37,21 +37,11 @@ so they don't need to be downloaded separately.
3737
(The `dev` config is for local development.)
3838

3939
```
40-
# macOS
41-
bazel build //... --spawn_strategy=local --config=dev
42-
43-
# Linux
4440
bazel build //... --config=dev
4541
```
4642

4743
The indexer binary will be placed at `bazel-bin/indexer/scip-clang`.
4844

49-
On macOS, `--spawn_strategy=local` provides a dramatic improvement
50-
in incremental build times (~10x) and is highly recommended.
51-
If you are more paranoid, instead use
52-
`--experimental_reuse_sandbox_directories` which cuts down
53-
on build times by 2x-3x, while maintaining sandboxing.
54-
5545
### Running the indexer
5646

5747
Example invocation for a CMake project:
@@ -72,13 +62,13 @@ Consult `--help` for user-facing flags, and `--help-all` for both user-facing an
7262
Run all tests:
7363

7464
```bash
75-
bazel test //test --spawn_strategy=local --config=dev
65+
bazel test //test --config=dev
7666
```
7767

7868
Update snapshot tests:
7969

8070
```bash
81-
bazel test //test:update --spawn_strategy=local --config=dev
71+
bazel test //test:update --config=dev
8272
```
8373

8474
NOTE: When adding a new test case, you need to manually create
@@ -88,10 +78,10 @@ an empty `.snapshot.cc` file for recording snapshot output
8878
Examples of running subsets of tests (follows directory structure):
8979

9080
```bash
91-
bazel test //test:test_index --spawn_strategy=local --config=dev
92-
bazel test //test:test_index_aliases --spawn_strategy=local --config=dev
93-
bazel test //test:update_index --spawn_strategy=local --config=dev
94-
bazel test //test:update_index_aliases --spawn_strategy=local --config=dev
81+
bazel test //test:test_index --config=dev
82+
bazel test //test:test_index_aliases --config=dev
83+
bazel test //test:update_index --config=dev
84+
bazel test //test:update_index_aliases --config=dev
9585
```
9686

9787
### Indexing large projects

tools/regenerate-compdb.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env bash
22
# For some reason, using --config=dev causes clangd errors inside Abseil
33
# on macOS. So use the default config instead.
4-
bazel build //tools:compdb --spawn_strategy=local
4+
bazel build //tools:compdb
55

66
PROJECT_ROOT="$(dirname "${BASH_SOURCE[0]}")/.."
77

0 commit comments

Comments
 (0)