@@ -29,6 +29,8 @@ bazel_dep(name = "rules_foreign_cc", version = "0.12.0")
2929bazel_dep (name = "abseil-cpp" , version = "20240722.0" , repo_name = "com_google_absl" )
3030
3131# As a workaround for https://github.com/bazelbuild/rules_foreign_cc/issues/1018.
32+ rules_foreign_cc_tools = use_extension ("@rules_foreign_cc//foreign_cc:extensions.bzl" , "tools" )
33+ use_repo (rules_foreign_cc_tools , ninja_mac = "ninja_1.12.1_mac" )
3234register_toolchains (
3335 "//:ninja_mac_arm64_toolchain" ,
3436)
@@ -162,7 +164,7 @@ llvm.toolchain_root(
162164llvm .sysroot (
163165 name = "llvm_toolchain_with_sysroot" ,
164166 targets = ["linux-x86_64" ],
165- label = "@@ org_chromium_sysroot_linux_x64//:sysroot" ,
167+ label = "@org_chromium_sysroot_linux_x64//:sysroot" ,
166168)
167169use_repo (llvm , "llvm_toolchain_with_sysroot" )
168170
@@ -216,3 +218,18 @@ wasi_sdk_sysroots(name = "wasi_sdk_sysroots")
216218
217219libclang_rt_wasm32 = use_repo_rule ("//wasm:wasi_sdk.bzl" , "libclang_rt_wasm32" )
218220libclang_rt_wasm32 (name = "libclang_rt_wasm32" )
221+
222+ http_archive = use_repo_rule ("@bazel_tools//tools/build_defs/repo:http.bzl" , "http_archive" )
223+ # This sysroot is used by github.com/vsco/bazel-toolchains.
224+ http_archive (
225+ name = "org_chromium_sysroot_linux_x64" ,
226+ build_file_content = """
227+ filegroup(
228+ name = "sysroot",
229+ srcs = glob(["*/**"]),
230+ visibility = ["//visibility:public"],
231+ )
232+ """ ,
233+ sha256 = "84656a6df544ecef62169cfe3ab6e41bb4346a62d3ba2a045dc5a0a2ecea94a3" ,
234+ urls = ["https://commondatastorage.googleapis.com/chrome-linux-sysroot/toolchain/2202c161310ffde63729f29d27fe7bb24a0bc540/debian_stretch_amd64_sysroot.tar.xz" ],
235+ )
0 commit comments