@@ -111,6 +111,11 @@ llvm.toolchain(
111
111
"darwin-aarch64" : ["https://github.com/llvm/llvm-project/releases/download/llvmorg-15.0.7/clang+llvm-15.0.7-arm64-apple-darwin22.0.tar.xz" ],
112
112
"darwin-x86_64" : ["https://github.com/llvm/llvm-project/releases/download/llvmorg-15.0.7/clang+llvm-15.0.7-x86_64-apple-darwin21.0.tar.xz" ],
113
113
},
114
+ cxx_standard = {"" : "c++17" },
115
+ )
116
+ llvm .extra_target_compatible_with (
117
+ name = "llvm_toolchain_with_urls" ,
118
+ constraints = ["@//:cxx17" ],
114
119
)
115
120
use_repo (llvm , "llvm_toolchain_with_urls" )
116
121
@@ -121,6 +126,11 @@ use_repo(llvm, "llvm_toolchain_with_urls")
121
126
llvm .toolchain (
122
127
name = "llvm_toolchain_13_0_0" ,
123
128
llvm_version = "13.0.0" ,
129
+ cxx_standard = {"" : "c++17" },
130
+ )
131
+ llvm .extra_target_compatible_with (
132
+ name = "llvm_toolchain_13_0_0" ,
133
+ constraints = ["@//:cxx17" ],
124
134
)
125
135
use_repo (llvm , "llvm_toolchain_13_0_0" )
126
136
@@ -129,6 +139,11 @@ llvm.toolchain(
129
139
name = "llvm_toolchain_with_absolute_paths" ,
130
140
absolute_paths = True ,
131
141
llvm_versions = LLVM_VERSIONS ,
142
+ cxx_standard = {"" : "c++17" },
143
+ )
144
+ llvm .extra_target_compatible_with (
145
+ name = "llvm_toolchain_with_absolute_paths" ,
146
+ constraints = ["@//:cxx17" ],
132
147
)
133
148
# We can share the downloaded LLVM distribution with the first configuration.
134
149
llvm .toolchain_root (
@@ -141,6 +156,11 @@ use_repo(llvm, "llvm_toolchain_with_absolute_paths")
141
156
llvm .toolchain (
142
157
name = "llvm_toolchain_with_system_llvm" ,
143
158
llvm_versions = LLVM_VERSIONS ,
159
+ cxx_standard = {"" : "c++17" },
160
+ )
161
+ llvm .extra_target_compatible_with (
162
+ name = "llvm_toolchain_with_system_llvm" ,
163
+ constraints = ["@//:cxx17" ],
144
164
)
145
165
# For this toolchain to work, the LLVM distribution archive would need to be unpacked here.
146
166
llvm .toolchain_root (
@@ -153,6 +173,11 @@ use_repo(llvm, "llvm_toolchain_with_system_llvm")
153
173
llvm .toolchain (
154
174
name = "llvm_toolchain_with_sysroot" ,
155
175
llvm_versions = LLVM_VERSIONS ,
176
+ cxx_standard = {"" : "c++17" },
177
+ )
178
+ llvm .extra_target_compatible_with (
179
+ name = "llvm_toolchain_with_sysroot" ,
180
+ constraints = ["@//:cxx17" ],
156
181
)
157
182
# We can share the downloaded LLVM distribution with the first configuration.
158
183
llvm .toolchain_root (
@@ -177,5 +202,10 @@ llvm.toolchain(
177
202
# distribution = "clang+llvm-17.0.6-x86_64-linux-gnu-ubuntu-22.04.tar.xz",
178
203
exec_os = "linux" ,
179
204
exec_arch = "amd64" ,
205
+ cxx_standard = {"" : "c++17" },
206
+ )
207
+ llvm .extra_target_compatible_with (
208
+ name = "llvm_toolchain_linux_exec" ,
209
+ constraints = ["@//:cxx17" ],
180
210
)
181
211
use_repo (llvm , "llvm_toolchain_linux_exec" )
0 commit comments