Skip to content

CI: Bump LDC-LLVM to v20.1.4 #4911

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 21 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
f5436c2
tree-wide: replace pointerTo() with LLPointerType::get(...)
liushuyu Feb 5, 2025
9cd0407
tree-wide: shuffle headers around
liushuyu Feb 5, 2025
3e31906
gen/llvm.h: adapt GET_INTRINSIC_DECL macro to LLVM 20 API
liushuyu Feb 5, 2025
147170e
utils/gen_gccbuiltins.cpp: mark most variables as const
liushuyu Feb 5, 2025
df2b7f4
gen/classes.cpp: suppress unused variable warning
liushuyu Feb 5, 2025
5f883c7
gen/optimizer.cpp: add the new LTO parameter everywhere
liushuyu Feb 5, 2025
fd37f7b
gen/dibuilder.cpp: adapt to API changes
liushuyu Feb 15, 2025
37b4ce7
jit-rt: adapt to LLVM 20 header changes
liushuyu Feb 15, 2025
cd2196c
CI: Bump LDC-LLVM to v20.1.3
kinke Apr 19, 2025
0dc1eb9
Cirrus CI: Adapt to Ubuntu rolling now being 25.04
kinke Apr 19, 2025
11babd1
druntime: Support LLVM v20.1 in ldc.intrinsics
kinke Apr 19, 2025
bcf4dc1
LLVM 20: Add vendored profdata/profgen tools and FileCheck util
kinke Apr 19, 2025
ccbb284
Adapt android-llvm-config.in to LLVM 20
kinke Apr 19, 2025
cc3bfbb
CMake: Auto-detect llvm-config-20 etc.
kinke Apr 19, 2025
b02f572
Hide new/recently inherited LLVM command-line options
kinke Apr 19, 2025
cdf8d9e
Adapt some tests to LLVM 20
kinke Apr 25, 2025
a7848bc
Fix up SPIR-V data-layout strings for LLVM 20
kinke Apr 25, 2025
d506a20
Adapt to LLVM 20 ASan library changes on Windows (CMake + linking)
kinke Apr 25, 2025
03fa7d6
Adapt some ASan lit-tests to LLVM 20
kinke Apr 26, 2025
7b71e15
CI: Bump LDC-LLVM to v20.1.4
kinke May 1, 2025
14050a6
Cirrus CI: Try to work around non-default libcurl dependency for ldc-…
kinke May 3, 2025
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
12 changes: 9 additions & 3 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ clone_steps_template: &CLONE_STEPS_TEMPLATE
common_steps_template: &COMMON_STEPS_TEMPLATE
install_lit_script: |
# Install lit
rm -f /usr/lib/python3.12/EXTERNALLY-MANAGED # required for Ubuntu 24.04
rm -f /usr/lib/python3.13/EXTERNALLY-MANAGED # required for Ubuntu 25.04
python3 -m pip install --user lit
python3 -c "import lit.main; lit.main.main();" --version . | head -n 1
clone_submodules_script: |
Expand Down Expand Up @@ -197,8 +197,14 @@ task:
environment:
CI_ARCH: x86_64
CI_OS: linux
EXTRA_APT_PACKAGES: "gdmd llvm-dev libclang-common-19-dev lld"
EXTRA_CMAKE_FLAGS: "-DBUILD_SHARED_LIBS=ON -DBUILD_LTO_LIBS=ON -DD_COMPILER=gdmd -DLDC_LINK_MANUALLY=ON"
EXTRA_APT_PACKAGES: "gdmd llvm-dev libclang-common-20-dev lld libcurl4-openssl-dev"
# need `-DCMAKE_EXE_LINKER_FLAGS=-lcurl` to work around libcurl dependency for ldc-profdata (distro LLVM apparently built with non-default LLVM_ENABLE_CURL=ON)
EXTRA_CMAKE_FLAGS: >-
-DBUILD_SHARED_LIBS=ON
-DBUILD_LTO_LIBS=ON
-DD_COMPILER=gdmd
-DLDC_LINK_MANUALLY=ON
-DCMAKE_EXE_LINKER_FLAGS=-lcurl
PARALLELISM: 8
# for gdmd:
LANG: C.UTF-8
Expand Down
10 changes: 5 additions & 5 deletions .github/actions/1-setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,26 +37,26 @@ runs:
# Make sure to link libzstd statically
sudo rm /usr/lib/$arch-linux-gnu/libzstd.so

- name: 'Linux: Install clang 19 from apt.llvm.org'
- name: 'Linux: Install clang 20 from apt.llvm.org'
if: runner.os == 'Linux'
shell: bash
run: |
set -eux
cd ..
curl -fL --retry 3 --max-time 30 -O https://apt.llvm.org/llvm.sh
sudo bash llvm.sh 19
sudo bash llvm.sh 20
for tool in clang clang++ ld.lld; do
sudo ln -sf $tool-19 /usr/bin/$tool
sudo ln -sf $tool-20 /usr/bin/$tool
$tool --version
done
- name: 'Windows: Install clang v19.1.3 from GitHub'
- name: 'Windows: Install clang v20.1.3 from GitHub'
if: runner.os == 'Windows'
shell: bash
run: |
set -eux
cd ..
curl -fL --retry 3 --max-time 300 -o clang.exe \
https://github.com/llvm/llvm-project/releases/download/llvmorg-19.1.3/LLVM-19.1.3-win64.exe
https://github.com/llvm/llvm-project/releases/download/llvmorg-20.1.3/LLVM-20.1.3-win64.exe
./clang.exe //S # double-slash for bash
rm clang.exe
# C:\Program Files\LLVM\bin should already be in PATH
Expand Down
22 changes: 11 additions & 11 deletions .github/actions/3-build-cross/android-llvm-config.in
Original file line number Diff line number Diff line change
Expand Up @@ -45,36 +45,36 @@ prefix=@LLVM_INSTALL_DIR@
has_rtti=NO
CPPFLAGS="-I${prefix}/include -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS"
CFLAGS="${CPPFLAGS} ${CFLAGS}"
CXXFLAGS="${CFLAGS} -std=c++17 -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables"
CXXFLAGS="${CFLAGS} -std=c++17 -fno-exceptions -funwind-tables"
if [ "$has_rtti" != "YES" ]; then CXXFLAGS="$CXXFLAGS -fno-rtti"; fi
LDFLAGS="-L${prefix}/lib"
LIBFILE="${prefix}/lib/libLLVM-$version.so"

components="aarch64 aarch64asmparser aarch64codegen aarch64desc aarch64disassembler aarch64info aarch64utils \
aggressiveinstcombine all all-targets analysis arm armasmparser armcodegen armdesc armdisassembler arminfo armutils \
asmparser asmprinter binaryformat bitreader bitstreamreader bitwriter cfguard codegen codegendata codegentypes core coroutines coverage \
asmparser asmprinter binaryformat bitreader bitstreamreader bitwriter cfguard cgdata codegen codegentypes core coroutines coverage \
debuginfobtf debuginfocodeview debuginfodwarf debuginfogsym debuginfologicalview debuginfomsf debuginfopdb demangle dlltooldriver dwarflinker dwarflinkerclassic dwarflinkerparallel dwp \
engine executionengine extensions filecheck frontenddriver frontendhlsl frontendoffloading frontendopenacc frontendopenmp fuzzercli fuzzmutate globalisel hipstdpar instcombine \
engine executionengine extensions filecheck frontendatomic frontenddriver frontendhlsl frontendoffloading frontendopenacc frontendopenmp fuzzercli fuzzmutate globalisel hipstdpar instcombine \
instrumentation interfacestub interpreter ipo irprinter irreader jitlink libdriver lineeditor linker lto mc mca mcdisassembler \
mcjit mcparser mirparser native nativecodegen objcarcopts objcopy object objectyaml option orcdebugging orcjit orcshared orctargetprocess \
passes profiledata remarks runtimedyld sandboxir scalaropts selectiondag spirv spirvanalysis spirvcodegen spirvdesc spirvinfo support symbolize tablegen target targetparser textapi \
passes profiledata remarks runtimedyld sandboxir scalaropts selectiondag spirv spirvanalysis spirvcodegen spirvdesc spirvinfo support symbolize tablegen target targetparser telemetry textapi \
textapibinaryreader transformutils vectorize webassembly webassemblyasmparser webassemblycodegen webassemblydesc webassemblydisassembler \
webassemblyinfo webassemblyutils windowsdriver windowsmanifest x86 x86asmparser x86codegen x86desc x86disassembler x86info \
x86targetmca xray"
static_libs="-lLLVMWindowsManifest -lLLVMXRay -lLLVMLibDriver -lLLVMDlltoolDriver -lLLVMTextAPIBinaryReader -lLLVMCoverage -lLLVMLineEditor \
-lLLVMSandboxIR -lLLVMSPIRVCodeGen -lLLVMSPIRVDesc -lLLVMSPIRVInfo -lLLVMSPIRVAnalysis \
-lLLVMX86TargetMCA -lLLVMX86Disassembler -lLLVMX86AsmParser -lLLVMX86CodeGen -lLLVMX86Desc -lLLVMX86Info -lLLVMWebAssemblyDisassembler \
static_libs="-lLLVMWindowsManifest -lLLVMXRay -lLLVMLibDriver -lLLVMDlltoolDriver -lLLVMTelemetry -lLLVMTextAPIBinaryReader -lLLVMCoverage -lLLVMLineEditor \
-lLLVMX86TargetMCA -lLLVMX86Disassembler -lLLVMX86AsmParser -lLLVMX86CodeGen -lLLVMX86Desc -lLLVMX86Info \
-lLLVMSPIRVCodeGen -lLLVMSPIRVDesc -lLLVMSPIRVInfo -lLLVMSPIRVAnalysis -lLLVMWebAssemblyDisassembler \
-lLLVMWebAssemblyAsmParser -lLLVMWebAssemblyCodeGen -lLLVMWebAssemblyUtils -lLLVMWebAssemblyDesc -lLLVMWebAssemblyInfo -lLLVMARMDisassembler \
-lLLVMARMAsmParser -lLLVMARMCodeGen -lLLVMARMDesc -lLLVMARMUtils -lLLVMARMInfo -lLLVMAArch64Disassembler \
-lLLVMAArch64AsmParser -lLLVMAArch64CodeGen -lLLVMAArch64Desc -lLLVMAArch64Utils -lLLVMAArch64Info -lLLVMOrcDebugging -lLLVMOrcJIT \
-lLLVMWindowsDriver -lLLVMMCJIT -lLLVMJITLink -lLLVMInterpreter -lLLVMExecutionEngine -lLLVMRuntimeDyld -lLLVMOrcTargetProcess -lLLVMOrcShared \
-lLLVMDWP -lLLVMDebugInfoLogicalView -lLLVMDebugInfoGSYM -lLLVMOption -lLLVMObjectYAML -lLLVMObjCopy -lLLVMMCA \
-lLLVMMCDisassembler -lLLVMLTO -lLLVMPasses -lLLVMHipStdPar -lLLVMCFGuard -lLLVMCoroutines -lLLVMipo \
-lLLVMVectorize -lLLVMLinker -lLLVMInstrumentation -lLLVMFrontendOpenMP -lLLVMFrontendOffloading -lLLVMFrontendOpenACC -lLLVMFrontendHLSL -lLLVMFrontendDriver -lLLVMExtensions \
-lLLVMDWARFLinkerParallel -lLLVMDWARFLinkerClassic -lLLVMDWARFLinker -lLLVMCodeGenData -lLLVMGlobalISel -lLLVMMIRParser -lLLVMAsmPrinter -lLLVMSelectionDAG \
-lLLVMCodeGen -lLLVMTarget -lLLVMObjCARCOpts -lLLVMCodeGenTypes -lLLVMIRPrinter -lLLVMInterfaceStub -lLLVMFileCheck -lLLVMFuzzMutate \
-lLLVMVectorize -lLLVMSandboxIR -lLLVMLinker -lLLVMInstrumentation -lLLVMFrontendOpenMP -lLLVMFrontendOffloading -lLLVMFrontendOpenACC -lLLVMFrontendHLSL -lLLVMFrontendDriver -lLLVMFrontendAtomic -lLLVMExtensions \
-lLLVMDWARFLinkerParallel -lLLVMDWARFLinkerClassic -lLLVMDWARFLinker -lLLVMGlobalISel -lLLVMMIRParser -lLLVMAsmPrinter -lLLVMSelectionDAG \
-lLLVMCodeGen -lLLVMTarget -lLLVMObjCARCOpts -lLLVMCodeGenTypes -lLLVMCGData -lLLVMIRPrinter -lLLVMInterfaceStub -lLLVMFileCheck -lLLVMFuzzMutate \
-lLLVMScalarOpts -lLLVMInstCombine -lLLVMAggressiveInstCombine -lLLVMTransformUtils -lLLVMBitWriter -lLLVMAnalysis \
-lLLVMProfileData -lLLVMSymbolize -lLLVMDebugInfoBTF -lLLVMDebugInfoPDB -lLLVMDebugInfoMSF -lLLVMDebugInfoDWARF -lLLVMObject -lLLVMTextAPI -lLLVMMCParser -lLLVMIRReader -lLLVMAsmParser -lLLVMMC -lLLVMDebugInfoCodeView \
-lLLVMProfileData -lLLVMSymbolize -lLLVMDebugInfoBTF -lLLVMDebugInfoPDB -lLLVMDebugInfoMSF -lLLVMDebugInfoCodeView -lLLVMDebugInfoDWARF -lLLVMObject -lLLVMTextAPI -lLLVMMCParser -lLLVMIRReader -lLLVMAsmParser -lLLVMMC \
-lLLVMBitReader -lLLVMFuzzerCLI -lLLVMCore -lLLVMRemarks -lLLVMBitstreamReader -lLLVMBinaryFormat -lLLVMTargetParser -lLLVMTableGen -lLLVMSupport \
-lLLVMDemangle"
shared_libs="-lLLVM-$version"
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ concurrency:
cancel-in-progress: true

env:
LLVM_VERSION: 19.1.7
LLVM_VERSION: 20.1.4

jobs:
build-native:
Expand Down Expand Up @@ -255,6 +255,8 @@ jobs:
os: android
arch: armv7a
android_x86_arch: i686
extra_cmake_flags: >-
-DLDC_INSTALL_LLVM_RUNTIME_LIBS_ARCH=arm-android

- job_name: Android aarch64
host_os: ubuntu-22.04
Expand Down
11 changes: 9 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -894,8 +894,15 @@ if (LDC_INSTALL_LLVM_RUNTIME_LIBS)
if(CMAKE_SIZEOF_VOID_P EQUAL 4)
set(compilerrt_arch_suffix "i386")
endif()
copy_compilerrt_lib("clang_rt.asan-${compilerrt_arch_suffix}.lib" "ldc_rt.asan.lib" FALSE)
copy_compilerrt_lib("clang_rt.lsan-${compilerrt_arch_suffix}.lib" "ldc_rt.lsan.lib" FALSE)
if(LDC_LLVM_VER LESS 2000)
copy_compilerrt_lib("clang_rt.asan-${compilerrt_arch_suffix}.lib" "ldc_rt.asan.lib" FALSE)
copy_compilerrt_lib("clang_rt.lsan-${compilerrt_arch_suffix}.lib" "ldc_rt.lsan.lib" FALSE)
else()
copy_compilerrt_lib("clang_rt.asan_static_runtime_thunk-${compilerrt_arch_suffix}.lib" "ldc_rt.asan_static_runtime_thunk.lib" FALSE)
copy_compilerrt_lib("clang_rt.asan_dynamic_runtime_thunk-${compilerrt_arch_suffix}.lib" "ldc_rt.asan_dynamic_runtime_thunk.lib" FALSE)
copy_compilerrt_lib("clang_rt.asan_dynamic-${compilerrt_arch_suffix}.lib" "ldc_rt.asan.lib" FALSE)
copy_compilerrt_lib("clang_rt.asan_dynamic-${compilerrt_arch_suffix}.dll" "clang_rt.asan_dynamic-${compilerrt_arch_suffix}.dll" FALSE)
endif()
copy_compilerrt_lib("clang_rt.builtins-${compilerrt_arch_suffix}.lib" "ldc_rt.builtins.lib" FALSE)
copy_compilerrt_lib("clang_rt.profile-${compilerrt_arch_suffix}.lib" "ldc_rt.profile.lib" FALSE)
copy_compilerrt_lib("clang_rt.fuzzer-${compilerrt_arch_suffix}.lib" "ldc_rt.fuzzer.lib" FALSE)
Expand Down
7 changes: 4 additions & 3 deletions cmake/Modules/FindLLVM.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@
# We also want an user-specified LLVM_ROOT_DIR to take precedence over the
# system default locations such as /usr/local/bin. Executing find_program()
# multiples times is the approach recommended in the docs.
set(llvm_config_names llvm-config-19.1 llvm-config191 llvm-config-19
set(llvm_config_names llvm-config-20.1 llvm-config201 llvm-config-20
llvm-config-19.1 llvm-config191 llvm-config-19
llvm-config-18.1 llvm-config181 llvm-config-18
llvm-config-17.0 llvm-config170 llvm-config-17
llvm-config-16.0 llvm-config160 llvm-config-16
Expand All @@ -47,11 +48,11 @@ if(APPLE)
# extra fallbacks for MacPorts & Homebrew
find_program(LLVM_CONFIG
NAMES ${llvm_config_names}
PATHS /opt/local/libexec/llvm-19/bin
PATHS /opt/local/libexec/llvm-20/bin /opt/local/libexec/llvm-19/bin
/opt/local/libexec/llvm-18/bin /opt/local/libexec/llvm-17/bin
/opt/local/libexec/llvm-16/bin /opt/local/libexec/llvm-15/bin
/opt/local/libexec/llvm/bin
/usr/local/opt/llvm@19/bin
/usr/local/opt/llvm@20/bin /usr/local/opt/llvm@19/bin
/usr/local/opt/llvm@18/bin /usr/local/opt/llvm@17/bin
/usr/local/opt/llvm@16/bin /usr/local/opt/llvm@15/bin
/usr/local/opt/llvm/bin
Expand Down
Loading
Loading