Skip to content

Commit

Permalink
rename
Browse files Browse the repository at this point in the history
  • Loading branch information
sokhealy committed Dec 4, 2024
1 parent ac9d330 commit 7fb89c5
Show file tree
Hide file tree
Showing 12 changed files with 23 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
package(default_visibility = ["//visibility:public"])

load("//cc/toolchains/llvm:cc_toolchain_config.bzl", "cc_toolchain_config")
load("//cc/toolchains/llvm:target_triplets.bzl", "X86_64_LINUX")
load("//cc/toolchains/llvm:target_triplets.bzl", "X86_64_WINDOWS")

filegroup(
name = "wrappers",
Expand All @@ -25,59 +25,59 @@ filegroup(
name = "ar_files",
srcs = [
":wrappers",
"@x86_64-linux-llvm-mingw//:ar",
"@x86_64-windows-llvm-mingw//:ar",
],
)

filegroup(
name = "as_files",
srcs = [
":wrappers",
"@x86_64-linux-llvm-mingw//:as",
"@x86_64-windows-llvm-mingw//:as",
],
)

filegroup(
name = "compiler_files",
srcs = [
":wrappers",
"@x86_64-linux-llvm-mingw//:clang",
"@x86_64-linux-llvm-mingw//:include",
"@x86_64-windows-llvm-mingw//:clang",
"@x86_64-windows-llvm-mingw//:include",
],
)

filegroup(
name = "dwp_files",
srcs = [
":wrappers",
"@x86_64-linux-llvm-mingw//:dwp",
"@x86_64-windows-llvm-mingw//:dwp",
],
)

filegroup(
name = "linker_files",
srcs = [
":wrappers",
"@x86_64-linux-llvm-mingw//:ar",
"@x86_64-linux-llvm-mingw//:clang",
"@x86_64-linux-llvm-mingw//:ld",
"@x86_64-linux-llvm-mingw//:lib",
"@x86_64-windows-llvm-mingw//:ar",
"@x86_64-windows-llvm-mingw//:clang",
"@x86_64-windows-llvm-mingw//:ld",
"@x86_64-windows-llvm-mingw//:lib",
],
)

filegroup(
name = "objcopy_files",
srcs = [
":wrappers",
"@x86_64-linux-llvm-mingw//:objcopy",
"@x86_64-windows-llvm-mingw//:objcopy",
],
)

filegroup(
name = "strip_files",
srcs = [
":wrappers",
"@x86_64-linux-llvm-mingw//:strip",
"@x86_64-windows-llvm-mingw//:strip",
],
)

Expand All @@ -86,12 +86,12 @@ filegroup(
srcs = [
"linker_files",
":compiler_files",
"@x86_64-linux-llvm-mingw//:bin",
"@x86_64-windows-llvm-mingw//:bin",
]
)

cc_toolchain_config(
name = "local-x86_64-linux",
name = "local-x86_64-windows",
abi_libc_version = "glibc_unknown",
abi_version = "clang",
compiler = "clang",
Expand All @@ -100,10 +100,10 @@ cc_toolchain_config(
"/usr/include",
"/usr/local/include",
],
host_system_name = X86_64_LINUX,
host_system_name = X86_64_WINDOWS,
target_cpu = "k8",
target_libc = "glibc_unknown",
target_system_name = X86_64_LINUX,
target_system_name = X86_64_WINDOWS,
tool_paths = {
"ar": "wrappers/llvm-ar",
"cpp": "wrappers/clang-cpp",
Expand All @@ -117,12 +117,12 @@ cc_toolchain_config(
"objdump": "wrappers/llvm-objdump",
"strip": "wrappers/llvm-strip",
},
toolchain_identifier = "clang-x86_64-linux",
toolchain_path_prefix = "external/x86_64-linux-llvm",
toolchain_identifier = "clang-x86_64-windows",
toolchain_path_prefix = "external/x86_64-windows-llvm",
)

cc_toolchain(
name = "cc-clang-x86_64-linux",
name = "cc-clang-x86_64-windows",
all_files = ":all_files",
ar_files = ":ar_files",
as_files = ":as_files",
Expand All @@ -131,22 +131,22 @@ cc_toolchain(
linker_files = ":linker_files",
objcopy_files = ":objcopy_files",
strip_files = ":strip_files",
toolchain_config = ":local-x86_64-linux",
toolchain_config = ":local-x86_64-windows",
)

toolchain(
name = "cc-toolchain-x86_64-linux",
name = "cc-toolchain-x86_64-windows",
exec_compatible_with = [
"@platforms//cpu:x86_64",
"@platforms//os:linux",
"@platforms//os:windows",
],
target_compatible_with = [
"@platforms//cpu:x86_64",
"@platforms//os:windows",
"//cc/constraints:llvm_toolchain",
],
target_settings = None,
toolchain = ":cc-clang-x86_64-linux",
toolchain = ":cc-clang-x86_64-windows",
toolchain_type = "@bazel_tools//tools/cpp:toolchain_type",
)

0 comments on commit 7fb89c5

Please sign in to comment.