File tree 4 files changed +753
-1
lines changed 4 files changed +753
-1
lines changed Original file line number Diff line number Diff line change 2
2
common --enable_bzlmod
3
3
common --noenable_workspace
4
4
5
+ # Specifies...
6
+ # --config=windows on Windows hosts
7
+ # --config=linux on Linux hosts
8
+ # --config=macos on macOS hosts
9
+ # NOTE: We assume our host and target platforms are identical.
10
+ common --enable_platform_specific_config
11
+
5
12
# Use C++20.
6
13
build --cxxopt=-std=c++20
7
14
build --host_cxxopt=-std=c++20
Original file line number Diff line number Diff line change @@ -21,6 +21,11 @@ cmake(
21
21
generate_args = ["-G Ninja" ],
22
22
lib_source = ":all_files" ,
23
23
out_binaries = ["z3" ],
24
- out_shared_libs = ["libz3.so" ],
24
+ out_shared_libs = select ({
25
+ "@platforms//os:linux" : ["libz3.so" ],
26
+ "@platforms//os:osx" : glob (["libz3*.dylib" ]),
27
+ "@platforms//os:windows" : ["z3.dll" ],
28
+ "//conditions:default" : ["@platforms//:incompatible" ],
29
+ }),
25
30
visibility = ["//visibility:public" ],
26
31
)
Original file line number Diff line number Diff line change @@ -17,3 +17,5 @@ bazel_dep(
17
17
version = "8.0.1" ,
18
18
dev_dependency = True ,
19
19
)
20
+
21
+ bazel_dep (name = "platforms" , version = "0.0.11" )
You can’t perform that action at this time.
0 commit comments