Skip to content

Commit f30cd08

Browse files
committed
Detect host platform automatically.
1 parent ad7c20a commit f30cd08

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

.bazelrc

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
# Try loading per-user configuration.
2-
try-import %workspace%/user.bazelrc
1+
# Make Bazel pickup Linux/Windows configs automatically.
2+
build --enable_platform_specific_config
33

44
# Linux-specific configuration.
55
build:linux --cxxopt=-std=c++17
@@ -56,3 +56,6 @@ build:ubsan --copt=-fno-omit-frame-pointer
5656
build:ubsan --copt=-DNDEBUG
5757
build:ubsan --copt=-fno-sanitize=function,vptr
5858
build:ubsan --linkopt=-fsanitize=undefined
59+
60+
# Try loading per-user configuration.
61+
try-import %workspace%/user.bazelrc

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,10 @@ Now you can build and test `lldb-eval`:
8787

8888
```bash
8989
# Build and run all tests
90-
bazel test --config=linux :all
90+
bazel test :all
9191

9292
# Evaluate a sample expression
93-
bazel run --config=windows :main -- "(1 + 2) * 42 / 4"
93+
bazel run :main -- "(1 + 2) * 42 / 4"
9494
```
9595

9696
> **Hint:** You can add this option to your `user.bazelrc` !
@@ -111,7 +111,7 @@ configuration. Check [Bazel docs](https://docs.bazel.build/versions/master/guide
111111
for the format. For example:
112112

113113
```bash
114-
# Building on Linux
114+
# Building on Linux (usually don't need this, Bazel detects automatically)
115115
build --config=linux
116116
# Using statically linked liblldb.so
117117
build --@llvm_project//:llvm_build=static

0 commit comments

Comments
 (0)