Skip to content

Add bootstrap shards for LLVM 19 and 20 #11007

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from
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
31 changes: 0 additions & 31 deletions 0_RootFS/LLVMBootstrap@16/bundled/patches/install-prefix.patch

This file was deleted.

31 changes: 0 additions & 31 deletions 0_RootFS/LLVMBootstrap@17/bundled/patches/install-prefix.patch

This file was deleted.

31 changes: 0 additions & 31 deletions 0_RootFS/LLVMBootstrap@18/bundled/patches/install-prefix.patch

This file was deleted.

16 changes: 16 additions & 0 deletions 0_RootFS/LLVMBootstrap@19/build_tarballs.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Include everything common between our LLVM versions (That's a lot)
include("../llvm_common.jl")

# Build the tarballs, then upload to Yggdrasil releases

name = "LLVMBootstrap"
version = v"19.1.7"
sources, script, products, dependencies = llvm_build_args(;version=version)
ndARGS, deploy_target = find_deploy_arg(ARGS)
# Earlier versions of GCC can cause Clang to fail with `error: unknown target CPU 'x86-64'`
# https://github.com/JuliaPackaging/BinaryBuilderBase.jl/pull/112#issuecomment-776940748
build_info = build_tarballs(ndARGS, name, version, sources, script, [host_platform], products, dependencies;
skip_audit=true, preferred_gcc_version=v"8")
if deploy_target !== nothing
upload_and_insert_shards(deploy_target, name, version, build_info)
end
16 changes: 16 additions & 0 deletions 0_RootFS/LLVMBootstrap@20/build_tarballs.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Include everything common between our LLVM versions (That's a lot)
include("../llvm_common.jl")

# Build the tarballs, then upload to Yggdrasil releases

name = "LLVMBootstrap"
version = v"20.1.2"
sources, script, products, dependencies = llvm_build_args(;version=version)
ndARGS, deploy_target = find_deploy_arg(ARGS)
# Earlier versions of GCC can cause Clang to fail with `error: unknown target CPU 'x86-64'`
# https://github.com/JuliaPackaging/BinaryBuilderBase.jl/pull/112#issuecomment-776940748
build_info = build_tarballs(ndARGS, name, version, sources, script, [host_platform], products, dependencies;
skip_audit=true, preferred_gcc_version=v"8")
if deploy_target !== nothing
upload_and_insert_shards(deploy_target, name, version, build_info)
end
12 changes: 7 additions & 5 deletions 0_RootFS/llvm_common.jl
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ llvm_tags = Dict(
v"16.0.6" => "7cbf1a2591520c2491aa35339f227775f4d3adf6",
v"17.0.6" => "6009708b4367171ccdbf4b5905cb6a803753fe18",
v"18.1.7" => "768118d1ad38bf13c545828f67bd6b474d61fc55",
v"19.1.7" => "cd708029e0b2869e80abe31ddb175f7c35361f90",
v"20.1.2" => "58df0ef89dd64126512e4ee27b4ac3fd8ddf6247",
)

function llvm_sources(;version = "v8.0.1", kwargs...)
Expand Down Expand Up @@ -74,6 +76,7 @@ function llvm_script(;version = v"8.0.1", llvm_build_type = "Release", kwargs...
# Then create the symlinks
ln -s $(basename ${prefix}/${target}/lib64/libxml2.so.*) ${prefix}/${target}/lib64/libxml2.so
ln -s $(basename ${prefix}/${target}/lib64/libxml2.so.*) ${prefix}/${target}/lib64/libxml2.so.2
ln -s $(basename ${prefix}/${target}/lib64/libxml2.so.*) ${prefix}/${target}/lib64/libxml2.so.16
ln -s $(basename ${prefix}/${target}/lib64/libiconv.so.*) ${prefix}/${target}/lib64/libiconv.so
ln -s $(basename ${prefix}/${target}/lib64/libiconv.so.*) ${prefix}/${target}/lib64/libiconv.so.2
ln -s $(basename ${prefix}/${target}/lib64/libz.so.*) ${prefix}/${target}/lib64/libz.so
Expand Down Expand Up @@ -178,12 +181,11 @@ function llvm_script(;version = v"8.0.1", llvm_build_type = "Release", kwargs...
CMAKE_FLAGS+=(-DZLIB_ROOT="${prefix}")

# Build!
cmake ${LLVM_SRCDIR} ${CMAKE_FLAGS[@]}
cmake -LA || true
make -j${nproc} VERBOSE=1
cmake -GNinja ${LLVM_SRCDIR} ${CMAKE_FLAGS[@]}
ninja -j${nproc} -vv

# Install!
make install -j${nproc} VERBOSE=1
ninja install
"""
end

Expand All @@ -204,7 +206,7 @@ function llvm_dependencies(; kwargs...)
return [
Dependency("Zlib_jll"),
Dependency("XML2_jll"),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Uhm, I think we should fix the xml2 version here, maybe depending on the llvm version for backward compatibility: something like xml2 ~2.13 for llvm <=18, and ~2.14 for llvm >= 19

# transitive dependency libiconv
# transitive dependency libiconv
]
end

Expand Down