Remove dead code, implement indirection TODO
diff --git a/README.md b/README.md
index 204a8c8..e85d790 100644
--- a/README.md
+++ b/README.md
@@ -125,7 +125,7 @@
# particular library. It is also possible to omit both static_library and
# shared_library, creating a header only toolchain lib.
# Use with statically linkage.
- static_library = "lib/libc++.a",
+ static_library = "lib/x86_64-unknown-linux-gnu/libc++.a",
# Use with shared linkage.
shared_library = "lib/libc++.so",
diff --git a/config/BUILD.bazel b/config/BUILD.bazel
index 3fe4bdb..6d98879 100644
--- a/config/BUILD.bazel
+++ b/config/BUILD.bazel
@@ -57,6 +57,13 @@
)
alias(
+ name = "llvm_config_site_multiplexer",
+ actual = select({
+ ":linux_x86_64": "@clang_llvm_x86_64_linux_gnu_ubuntu//:llvm_config_site",
+ }),
+)
+
+alias(
name = "startup_libs",
actual = select({
":linux_x86_64": "@debian_stretch_amd64_sysroot//:startup_libs",
diff --git a/config/rules_cc_toolchain_config.BUILD b/config/rules_cc_toolchain_config.BUILD
index fc230ea..c60a09f 100644
--- a/config/rules_cc_toolchain_config.BUILD
+++ b/config/rules_cc_toolchain_config.BUILD
@@ -33,6 +33,11 @@
)
label_flag(
+ name = "llvm_config_site",
+ build_setting_default = "@rules_cc_toolchain//config:llvm_config_site_multiplexer",
+)
+
+label_flag(
name = "compiler_rt",
build_setting_default = "@rules_cc_toolchain//config:libclang_rt_multiplexer",
)
diff --git a/third_party/clang_llvm_x86_64_linux_gnu_ubuntu.BUILD b/third_party/clang_llvm_x86_64_linux_gnu_ubuntu.BUILD
index 947ccda..741e352 100644
--- a/third_party/clang_llvm_x86_64_linux_gnu_ubuntu.BUILD
+++ b/third_party/clang_llvm_x86_64_linux_gnu_ubuntu.BUILD
@@ -66,23 +66,6 @@
)
cc_toolchain_import(
- name = "llvm_libstddef",
- hdrs = glob(["lib/clang/*/include/stddef.h"]),
- includes = ["lib/clang/{clang_version}/include".format(clang_version = CLANG_VERSION)],
- # runtime_path = "/usr/lib/x86_64-linux-gnu",
- # shared_library = "lib/libunwind.so",
- # static_library = "lib/x86_64-unknown-linux-gnu/libunwind.a",
- target_compatible_with = select({
- "@platforms//os:linux": ["@platforms//cpu:x86_64"],
- "//conditions:default": ["@platforms//:incompatible"],
- }),
- visibility = ["@rules_cc_toolchain//config:__pkg__"],
- deps = [
- "@rules_cc_toolchain_config//:libc",
- ],
-)
-
-cc_toolchain_import(
name = "llvm_libcxx",
hdrs = glob(["include/c++/v1/**"]),
includes = ["include/c++/v1"],
@@ -93,11 +76,9 @@
}),
visibility = ["@rules_cc_toolchain//config:__pkg__"],
deps = [
- # TODO: Add more indirection.
- ":llvm_config_site",
- # ":llvm_libstddef",
"@rules_cc_toolchain_config//:libc",
"@rules_cc_toolchain_config//:libunwind",
+ "@rules_cc_toolchain_config//:llvm_config_site",
],
)