Skip to content

Commit

Permalink
Bump LLVM packages (#5044)
Browse files Browse the repository at this point in the history
  • Loading branch information
vchuravy authored Jun 19, 2022
1 parent 64bbd35 commit 5701071
Show file tree
Hide file tree
Showing 6 changed files with 49 additions and 14 deletions.
4 changes: 2 additions & 2 deletions L/LLVM/Clang@13.0.1/build_tarballs.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "Clang"
llvm_full_version = v"13.0.1+0"
libllvm_version = v"13.0.1+0"
llvm_full_version = v"13.0.1+1"
libllvm_version = v"13.0.1+1"

# Include common LLVM stuff
include("../common.jl")
Expand Down
4 changes: 2 additions & 2 deletions L/LLVM/Clang_assert@13.0.1/build_tarballs.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "Clang"
llvm_full_version = v"13.0.1+0"
libllvm_version = v"13.0.1+0"
llvm_full_version = v"13.0.1+1"
libllvm_version = v"13.0.1+1"


# Include common LLVM stuff
Expand Down
4 changes: 2 additions & 2 deletions L/LLVM/LLVM@13.0.1/build_tarballs.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "LLVM"
llvm_full_version = v"13.0.1+0"
libllvm_version = v"13.0.1+0"
llvm_full_version = v"13.0.1+1"
libllvm_version = v"13.0.1+1"


# Include common LLVM stuff
Expand Down
4 changes: 2 additions & 2 deletions L/LLVM/LLVM_assert@13.0.1/build_tarballs.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "LLVM"
llvm_full_version = v"13.0.1+0"
libllvm_version = v"13.0.1+0"
llvm_full_version = v"13.0.1+1"
libllvm_version = v"13.0.1+1"


# Include common LLVM stuff
Expand Down
4 changes: 2 additions & 2 deletions L/LLVM/MLIR@13.0.1/build_tarballs.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "MLIR"
llvm_full_version = v"13.0.1+0"
libllvm_version = v"13.0.1+0"
llvm_full_version = v"13.0.1+1"
libllvm_version = v"13.0.1+1"


# Include common LLVM stuff
Expand Down
43 changes: 39 additions & 4 deletions L/LLVM/common.jl
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,21 @@ mv -v ${LLVM_ARTIFACT_DIR}/lib/clang ${prefix}/lib/clang
install_license ${LLVM_ARTIFACT_DIR}/share/licenses/LLVM_full*/*
"""

const mlirscript = raw"""
const mlirscript_v13 = raw"""
# First, find (true) LLVM library directory in ~/.artifacts somewhere
LLVM_ARTIFACT_DIR=$(dirname $(dirname $(realpath ${prefix}/tools/opt${exeext})))
# Clear out our `${prefix}`
rm -rf ${prefix}/*
# Copy over `libMLIR` and `include`, specifically.
mkdir -p ${prefix}/include ${prefix}/tools ${libdir} ${prefix}/lib
mv -v ${LLVM_ARTIFACT_DIR}/include/mlir* ${prefix}/include/
mv -v ${LLVM_ARTIFACT_DIR}/tools/mlir* ${prefix}/tools/
mv -v ${LLVM_ARTIFACT_DIR}/$(basename ${libdir})/*MLIR*.${dlext}* ${libdir}/
mv -v ${LLVM_ARTIFACT_DIR}/$(basename ${libdir})/*mlir*.${dlext}* ${libdir}/
install_license ${LLVM_ARTIFACT_DIR}/share/licenses/LLVM_full*/*
"""

const mlirscript_v14 = raw"""
# First, find (true) LLVM library directory in ~/.artifacts somewhere
LLVM_ARTIFACT_DIR=$(dirname $(dirname $(realpath ${prefix}/tools/opt${exeext})))
Expand Down Expand Up @@ -370,7 +384,28 @@ mv -v ${LLVM_ARTIFACT_DIR}/lib/liblld*.a ${prefix}/lib
install_license ${LLVM_ARTIFACT_DIR}/share/licenses/LLVM_full*/*
"""

const llvmscript = raw"""
const llvmscript_v13 = raw"""
# First, find (true) LLVM library directory in ~/.artifacts somewhere
LLVM_ARTIFACT_DIR=$(dirname $(dirname $(realpath ${prefix}/tools/opt${exeext})))
# Clear out our `${prefix}`
rm -rf ${prefix}/*
# Copy over everything, but eliminate things already put inside `Clang_jll` or `libLLVM_jll`:
mv -v ${LLVM_ARTIFACT_DIR}/* ${prefix}/
rm -vrf ${prefix}/include/{clang*,llvm*,mlir*}
rm -vrf ${prefix}/bin/{clang*,llvm-config,mlir*}
rm -vrf ${prefix}/tools/{clang*,llvm-config,mlir*}
rm -vrf ${libdir}/libclang*.${dlext}*
rm -vrf ${libdir}/*LLVM*.${dlext}*
rm -vrf ${libdir}/*MLIR*.${dlext}*
rm -vrf ${prefix}/lib/*LLVM*.a
rm -vrf ${prefix}/lib/libclang*.a
rm -vrf ${prefix}/lib/clang
rm -vrf ${prefix}/lib/mlir
# Move lld to tools/
mv -v "${bindir}/lld${exeext}" "${prefix}/tools/lld${exeext}"
"""

const llvmscript_v14 = raw"""
# First, find (true) LLVM library directory in ~/.artifacts somewhere
LLVM_ARTIFACT_DIR=$(dirname $(dirname $(realpath ${prefix}/tools/opt${exeext})))
Expand Down Expand Up @@ -484,7 +519,7 @@ function configure_extraction(ARGS, LLVM_full_version, name, libLLVM_version=not
ExecutableProduct(["clang", "clang-$(version.major)"], :clang, "tools"),
]
elseif name == "MLIR"
script = mlirscript
script = version < v"14" ? mlirscript_v13 : mlirscript_v14
products = [
LibraryProduct("libMLIR", :libMLIR, dont_dlopen=true),
]
Expand All @@ -502,7 +537,7 @@ function configure_extraction(ARGS, LLVM_full_version, name, libLLVM_version=not
]

elseif name == "LLVM"
script = llvmscript
script = version < v"14" ? llvmscript_v13 : llvmscript_v14
products = [
LibraryProduct(["LTO", "libLTO"], :liblto, dont_dlopen=true),
ExecutableProduct("opt", :opt, "tools"),
Expand Down

0 comments on commit 5701071

Please sign in to comment.