-
Notifications
You must be signed in to change notification settings - Fork 557
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Jonas Krimmer <[email protected]>
- Loading branch information
Showing
3 changed files
with
48 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"18.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 |
31 changes: 31 additions & 0 deletions
31
0_RootFS/LLVMBootstrap@18/bundled/patches/install-prefix.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
starting from llvm14 the install prefix breaks via symlinks; | ||
/usr/lib/llvm14/lib/cmake/llvm/LLVMConfig.cmake goes up 3 directories to find | ||
/usr/lib/llvm14/include as LLVM_INCLUDE_DIRS, but to even use this cmake folder | ||
at all it has to be symlinked to /usr/lib/cmake/llvm .. so the directory it | ||
instead uses is just /usr/include, which is not where the cmake includes are. | ||
this hardcodes them to the install prefix we pass via cmake, which should | ||
always be correct, and what cmake tries to autodetect anyway. | ||
|
||
also see: https://reviews.llvm.org/D29969 | ||
|
||
this is supposedly fixed now, but for some reason it still isn't | ||
--- a/llvm/cmake/modules/CMakeLists.txt | ||
+++ b/llvm/cmake/modules/CMakeLists.txt | ||
@@ -41,6 +41,8 @@ | ||
# | ||
|
||
set(LLVM_CONFIG_CODE " | ||
+# this is wrong when automatically detected | ||
+set(LLVM_INSTALL_PREFIX \"${CMAKE_INSTALL_PREFIX}\") | ||
# LLVM_BUILD_* values available only from LLVM build tree. | ||
set(LLVM_BUILD_BINARY_DIR \"${LLVM_BINARY_DIR}\") | ||
set(LLVM_BUILD_LIBRARY_DIR \"${LLVM_LIBRARY_DIR}\") | ||
@@ -109,8 +111,6 @@ | ||
# | ||
# Generate LLVMConfig.cmake for the install tree. | ||
# | ||
- | ||
-find_prefix_from_config(LLVM_CONFIG_CODE LLVM_INSTALL_PREFIX "${LLVM_INSTALL_PACKAGE_DIR}") | ||
|
||
extend_path(LLVM_CONFIG_MAIN_INCLUDE_DIR "\${LLVM_INSTALL_PREFIX}" "${CMAKE_INSTALL_INCLUDEDIR}") | ||
# This is the same as the above because the handwritten and generated headers |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters