File tree Expand file tree Collapse file tree 8 files changed +28
-13
lines changed Expand file tree Collapse file tree 8 files changed +28
-13
lines changed Original file line number Diff line number Diff line change @@ -206,6 +206,15 @@ config_setting(
206
206
visibility = ["//visibility:public" ],
207
207
)
208
208
209
+ config_setting (
210
+ name = "_enable_bzlmod_not_libcpp" ,
211
+ flag_values = {
212
+ ":enable_bzlmod" : "true" ,
213
+ ":use_libcpp" : "false" ,
214
+ },
215
+ visibility = ["//visibility:public" ],
216
+ )
217
+
209
218
py_binary (
210
219
name = "fix_include_guards" ,
211
220
srcs = [
Original file line number Diff line number Diff line change @@ -117,8 +117,8 @@ cc_toolchain_config(
117
117
abi_version = "clang" ,
118
118
builtin_sysroot = select ({
119
119
"@rules_swiftnav//cc:_use_libcpp" : None ,
120
- # Remove once bzlmod is enabled by default
121
- "@rules_swiftnav//cc:_enable_bzlmod " : "external/rules_swiftnav++swift_cc_toolchain_extension+aarch64-sysroot" ,
120
+ # When bzlmod is enabled but libcpp is not, use the bzlmod path
121
+ "@rules_swiftnav//cc:_enable_bzlmod_not_libcpp " : "external/rules_swiftnav++swift_cc_toolchain_extension+aarch64-sysroot" ,
122
122
"//conditions:default" : "external/aarch64-sysroot" ,
123
123
}),
124
124
compiler = "clang" ,
Original file line number Diff line number Diff line change @@ -103,8 +103,8 @@ cc_toolchain_config(
103
103
abi_version = "clang" ,
104
104
builtin_sysroot = select ({
105
105
"@rules_swiftnav//cc:_use_libcpp" : None ,
106
- # Remove once bzlmod is enabled by default
107
- "@rules_swiftnav//cc:_enable_bzlmod " : "external/rules_swiftnav++swift_cc_toolchain_extension+aarch64-sysroot" ,
106
+ # When bzlmod is enabled but libcpp is not, use the bzlmod path
107
+ "@rules_swiftnav//cc:_enable_bzlmod_not_libcpp " : "external/rules_swiftnav++swift_cc_toolchain_extension+aarch64-sysroot" ,
108
108
"//conditions:default" : "external/aarch64-sysroot" ,
109
109
}),
110
110
compiler = "clang" ,
Original file line number Diff line number Diff line change @@ -117,8 +117,8 @@ cc_toolchain_config(
117
117
abi_version = "clang" ,
118
118
builtin_sysroot = select ({
119
119
"@rules_swiftnav//cc:_use_libcpp" : None ,
120
- # Remove once bzlmod is enabled by default
121
- "@rules_swiftnav//cc:_enable_bzlmod " : "external/rules_swiftnav++swift_cc_toolchain_extension+x86_64-sysroot" ,
120
+ # When bzlmod is enabled but libcpp is not, use the bzlmod path
121
+ "@rules_swiftnav//cc:_enable_bzlmod_not_libcpp " : "external/rules_swiftnav++swift_cc_toolchain_extension+x86_64-sysroot" ,
122
122
"//conditions:default" : "external/x86_64-sysroot" ,
123
123
}),
124
124
compiler = "clang" ,
Original file line number Diff line number Diff line change @@ -117,8 +117,8 @@ cc_toolchain_config(
117
117
abi_version = "clang" ,
118
118
builtin_sysroot = select ({
119
119
"@rules_swiftnav//cc:_use_libcpp" : None ,
120
- # Remove once bzlmod is enabled by default
121
- "@rules_swiftnav//cc:_enable_bzlmod " : "external/rules_swiftnav++swift_cc_toolchain_extension+aarch64-sysroot" ,
120
+ # When bzlmod is enabled but libcpp is not, use the bzlmod path
121
+ "@rules_swiftnav//cc:_enable_bzlmod_not_libcpp " : "external/rules_swiftnav++swift_cc_toolchain_extension+aarch64-sysroot" ,
122
122
"//conditions:default" : "external/aarch64-sysroot" ,
123
123
}),
124
124
compiler = "clang" ,
Original file line number Diff line number Diff line change @@ -102,8 +102,9 @@ cc_toolchain_config(
102
102
abi_libc_version = "glibc_unknown" ,
103
103
abi_version = "clang" ,
104
104
builtin_sysroot = select ({
105
- # Remove once bzlmod is enabled by default
106
- "@rules_swiftnav//cc:_enable_bzlmod" : "external/rules_swiftnav++swift_cc_toolchain_extension+aarch64-sysroot" ,
105
+ # _use_libcpp case needs to be implemented properly here!
106
+ # When bzlmod is enabled but libcpp is not, use the bzlmod path
107
+ "@rules_swiftnav//cc:_enable_bzlmod_not_libcpp" : "external/rules_swiftnav++swift_cc_toolchain_extension+aarch64-sysroot" ,
107
108
"//conditions:default" : "external/aarch64-sysroot" ,
108
109
}),
109
110
compiler = "clang" ,
Original file line number Diff line number Diff line change @@ -117,8 +117,8 @@ cc_toolchain_config(
117
117
abi_version = "clang" ,
118
118
builtin_sysroot = select ({
119
119
"@rules_swiftnav//cc:_use_libcpp" : None ,
120
- # Remove once bzlmod is enabled by default
121
- "@rules_swiftnav//cc:_enable_bzlmod " : "external/rules_swiftnav++swift_cc_toolchain_extension+x86_64-sysroot" ,
120
+ # When bzlmod is enabled but libcpp is not, use the bzlmod path
121
+ "@rules_swiftnav//cc:_enable_bzlmod_not_libcpp " : "external/rules_swiftnav++swift_cc_toolchain_extension+x86_64-sysroot" ,
122
122
"//conditions:default" : "external/x86_64-sysroot" ,
123
123
}),
124
124
compiler = "clang" ,
You can’t perform that action at this time.
0 commit comments