File tree 4 files changed +69
-1
lines changed
4 files changed +69
-1
lines changed Original file line number Diff line number Diff line change @@ -89,7 +89,7 @@ build:java21 --tool_java_runtime_version=remotejdk_21
89
89
import %workspace%/tools/javacopts.bazelrc
90
90
91
91
# For release, stamp binaries, use optimized mode w/ minimum line table debugging.
92
- build:release --stamp -c opt --copt=-gmlt
92
+ build:release --stamp -c opt
93
93
94
94
# Use the RBE instance in the kythe-repo project
95
95
build:remote --remote_instance_name=projects/kythe-repo/instances/default_instance --bes_instance_name=kythe-repo
@@ -124,6 +124,10 @@ build:remote --repo_env=KYTHE_DO_NOT_DETECT_BAZEL_TOOLCHAINS=1
124
124
build:remote --extra_toolchains=//tools/build_rules/lexyacc:lexyacc_remote_toolchain
125
125
build:remote --extra_toolchains=//tools/build_rules/external_tools:external_tools_remote_toolchain
126
126
127
+ # Build fully static binaries linked against musl on Linux.
128
+ common:static --platforms=//platforms:linux_x86_64_musl
129
+ common:static-arm64 --platforms=//platforms:linux_arm64_musl
130
+
127
131
build:remote --action_env=LEIN_JAVA_CMD=
128
132
129
133
build:prepush --verbose_failures --noshow_loading_progress --noshow_progress
Original file line number Diff line number Diff line change @@ -109,3 +109,21 @@ git_repository(
109
109
commit = "133d89a6069ce253a92d32a93fdb7db9ef100e9d" ,
110
110
remote = "https://github.com/erenon/bazel_clang_tidy.git" ,
111
111
)
112
+
113
+ http_archive (
114
+ name = "musl_toolchains" ,
115
+ sha256 = "26cacffab74e10f0840c83b0be9193dc6deccfbc8ec1cf6f8362dc61d0057fa1" ,
116
+ url = "https://github.com/bazel-contrib/musl-toolchain/releases/download/v0.1.15/musl_toolchain-v0.1.15.tar.gz" ,
117
+ )
118
+
119
+ load ("@musl_toolchains//:repositories.bzl" , "load_musl_toolchains" )
120
+
121
+ load_musl_toolchains (
122
+ extra_target_compatible_with = [
123
+ "@//toolchains:musl_on" ,
124
+ ],
125
+ )
126
+
127
+ load ("@musl_toolchains//:toolchains.bzl" , "register_musl_toolchains" )
128
+
129
+ register_musl_toolchains ()
Original file line number Diff line number Diff line change
1
+ package (default_visibility = ["//visibility:public" ])
2
+
3
+ # Target this platforms with --platforms for a static build linked against musl libc.
4
+ # Only meant to be used as a target platform.
5
+ platform (
6
+ name = "linux_x86_64_musl" ,
7
+ constraint_values = [
8
+ "@platforms//cpu:x86_64" ,
9
+ "@platforms//os:linux" ,
10
+ "//toolchains:musl_on" ,
11
+ ],
12
+ )
13
+
14
+ # Target this platforms with --platforms for a static build linked against musl libc.
15
+ # Only meant to be used as a target platform.
16
+ platform (
17
+ name = "linux_arm64_musl" ,
18
+ constraint_values = [
19
+ "@platforms//cpu:arm64" ,
20
+ "@platforms//os:linux" ,
21
+ "//toolchains:musl_on" ,
22
+ ],
23
+ )
Original file line number Diff line number Diff line change
1
+ constraint_setting (
2
+ name = "use_musl" ,
3
+ default_constraint_value = ":musl_off" ,
4
+ visibility = [
5
+ "//visibility:public" ,
6
+ ],
7
+ )
8
+
9
+ constraint_value (
10
+ name = "musl_on" ,
11
+ constraint_setting = ":use_musl" ,
12
+ visibility = [
13
+ "//visibility:public" ,
14
+ ],
15
+ )
16
+
17
+ constraint_value (
18
+ name = "musl_off" ,
19
+ constraint_setting = ":use_musl" ,
20
+ visibility = [
21
+ "//visibility:public" ,
22
+ ],
23
+ )
You can’t perform that action at this time.
0 commit comments