Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
143 changes: 4 additions & 139 deletions bazel/include/llvm.MODULE.bazel
Original file line number Diff line number Diff line change
@@ -1,143 +1,8 @@
"LLVM configuration"

bazel_dep(name = "toolchains_llvm", version = "1.3.0")
single_version_override(
module_name = "toolchains_llvm",
patch_strip = 1,
patches = [
"//:patches/toolchains_llvm.patch",
],
)
# LLVM toolchain required for compiling binary with cgo
bazel_dep(name = "toolchains_llvm", version = "1.5.0")

llvm = use_extension("@toolchains_llvm//toolchain/extensions:llvm.bzl", "llvm")
llvm.toolchain(
name = "llvm_toolchain",
llvm_versions = {
# Default to version 16. Used for linux-aarch64
"": "16.0.0",
"darwin-aarch64": "15.0.6",
"linux-x86_64": "14.0.0",
},
sha256 = {
"darwin-aarch64": "32bc7b8eee3d98f72dd4e5651e6da990274ee2d28c5c19a7d8237eb817ce8d91",
"linux-x86_64": "564fcbd79c991e93fdf75f262fa7ac6553ec1dd04622f5d7db2a764c5dc7fac6",
},
stdlib = {
"darwin-aarch64": "libc",
"linux-x86_64": "libc",
},
strip_prefix = {
"darwin-aarch64": "clang+llvm-15.0.6-arm64-apple-darwin21.0",
"linux-x86_64": "clang+llvm-14.0.0-x86_64-linux-gnu",
},
urls = {
"darwin-aarch64": ["https://github.com/llvm/llvm-project/releases/download/llvmorg-15.0.6/clang+llvm-15.0.6-arm64-apple-darwin21.0.tar.xz"],
"linux-x86_64": ["https://github.com/aspect-forks/llvm-project/releases/download/aspect-release-14.0.0/clang+llvm-14.0.0-x86_64-linux-gnu.tar.xz"],
},
)
llvm.sysroot(
name = "llvm_toolchain",
label = "@org_chromium_sysroot_linux_x86_64//:sysroot",
targets = ["linux-x86_64"],
)
llvm.sysroot(
name = "llvm_toolchain",
label = "@org_chromium_sysroot_linux_arm64//:sysroot",
targets = ["linux-aarch64"],
)
llvm.sysroot(
name = "llvm_toolchain",
label = "@sysroot_darwin_universal//:sysroot",
targets = [
"darwin-aarch64",
"darwin-x86_64",
],
)
llvm.toolchain(llvm_version = "19.1.0")
use_repo(llvm, "llvm_toolchain")

http_archive = use_repo_rule("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

http_archive(
name = "org_chromium_sysroot_linux_arm64",
build_file_content = """
filegroup(
name = "sysroot",
srcs = glob(["*/**"]),
visibility = ["//visibility:public"],
)
""",
sha256 = "cf2fefded0449f06d3cf634bfa94ffed60dbe47f2a14d2900b00eb9bcfb104b8",
urls = ["https://commondatastorage.googleapis.com/chrome-linux-sysroot/toolchain/80fc74e431f37f590d0c85f16a9d8709088929e8/debian_bullseye_arm64_sysroot.tar.xz"],
)

http_archive(
name = "org_chromium_sysroot_linux_x86_64",
build_file_content = """
filegroup(
name = "sysroot",
srcs = glob(["*/**"]),
visibility = ["//visibility:public"],
)
""",
sha256 = "04b94ba1098b71f8543cb0ba6c36a6ea2890d4d417b04a08b907d96b38a48574",
urls = ["https://commondatastorage.googleapis.com/chrome-linux-sysroot/toolchain/f5f68713249b52b35db9e08f67184cac392369ab/debian_bullseye_amd64_sysroot.tar.xz"],
)

http_archive(
name = "sysroot_darwin_universal",
build_file_content = """
filegroup(
name = "sysroot",
srcs = glob(
include = ["**"],
exclude = ["**/*:*"],
),
visibility = ["//visibility:public"],
)
""",
# The ruby header has an infinite symlink that we need to remove.
patch_cmds = ["rm System/Library/Frameworks/Ruby.framework/Versions/Current/Headers/ruby/ruby"],
sha256 = "71ae00a90be7a8c382179014969cec30d50e6e627570af283fbe52132958daaf",
strip_prefix = "MacOSX11.3.sdk",
urls = ["https://s3.us-east-2.amazonaws.com/static.aspect.build/sysroots/MacOSX11.3.sdk.tar.xz"],
)

execution_oses = [
"macos",
"linux",
]

execution_cpus = [
"aarch64",
"x86_64",
]

target_oses = [
"macos",
"linux",
]

target_cpus = [
"aarch64",
"x86_64",
]

platforms = [
{
"exe_os": exe_os,
"exe_cpu": exe_cpu,
"tgt_os": tgt_os,
"tgt_cpu": tgt_cpu,
}
for exe_os in execution_oses
for exe_cpu in execution_cpus
for tgt_os in target_oses
for tgt_cpu in target_cpus
]

[register_toolchains("//platforms/toolchains:{}_{}_{}_{}_llvm".format(
p["exe_os"],
p["exe_cpu"],
p["tgt_os"],
p["tgt_cpu"],
)) for p in platforms]
register_toolchains("@llvm_toolchain//:all")
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/aspect-build/aspect-cli-legacy

go 1.24.9
go 1.25.4

require (
github.com/alphadose/haxmap v1.4.1
Expand Down
10 changes: 0 additions & 10 deletions patches/aspect-gazelle-runner.patch

This file was deleted.

78 changes: 0 additions & 78 deletions patches/toolchains_llvm.patch

This file was deleted.

Loading