Skip to content
Merged

LLVM 21 #25055

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
008affa
build: update to LLVM 21
alexrp Jul 16, 2025
b7a8c04
zig cc: update driver files to LLVM 21
alexrp Jul 16, 2025
ce7339e
zig cc: update intrinsic headers to LLVM 21
alexrp Jul 16, 2025
e84e9d3
libcxxabi: update to LLVM 21
alexrp Jul 16, 2025
d9f0fbf
libcxx: update to LLVM 21
alexrp Jul 16, 2025
c34fc8f
llvm-libc: update to LLVM 21
alexrp Jul 16, 2025
85438e7
libunwind: update to LLVM 21
alexrp Jul 16, 2025
ac20506
libtsan: update to LLVM 21
alexrp Jul 16, 2025
7e6cb7c
compiler: respond to API changes in LLVM 21
alexrp Jul 16, 2025
5739ce7
update_cpu_features: fix a fmtId call to be fmtIdPU
alexrp Jul 16, 2025
94f95fe
update_cpu_features: bump branch quota for amdgcn
alexrp Jul 16, 2025
587eddd
std.Target: update CPU features to LLVM 21
alexrp Jul 16, 2025
2c0cc81
std.Target: bump feature bit count from 288 to 317
alexrp Jul 16, 2025
978555e
std.Target.x86: purge avx10.n-256, rename avx10.n_512 to avx10.n, req…
alexrp Aug 27, 2025
464eef3
std.Target: make ultrasparc3 the baseline for sparc64-solaris
alexrp Aug 2, 2025
fdd32a2
std.Target: add managarm OS tag
alexrp Aug 28, 2025
0b9f5e2
std.Target: fix alignment for int/long types on m68k
alexrp Aug 5, 2025
5b80900
std.zig.system: update aarch64 and powerpc cpu detection for LLVM 21
alexrp Jul 22, 2025
c0cfe57
zig cc: update options data to LLVM 21
alexrp Jul 16, 2025
8c47dda
zig cc: pass CPU features to Clang using the new -Xclangas when assem…
alexrp Aug 3, 2025
c44f631
zig cc: pass -mthumb to the assembler as necessary
alexrp Aug 3, 2025
2b84eb8
llvm: update data layout strings for LLVM 21
alexrp Jul 16, 2025
dfa55e1
musl: replace .data.rel.ro with .section .data.rel.ro,"aw"
alexrp Jul 16, 2025
e9ac2ce
compiler-rt: move strlen from libzigc to here
alexrp Jul 16, 2025
c4592da
compiler-rt: use native f16 type for loongarch
alexrp Jul 16, 2025
53c53a2
llvm: switch to native f16 IR type for s390x
alexrp Aug 2, 2025
d4882d1
llvm: switch to native f128 IR type for nvptx
alexrp Aug 2, 2025
1c858ba
llvm: remove f16 special case for soft float aarch64
alexrp Aug 2, 2025
e4f38a6
llvm: switch to native f16 IR type for all hexagon targets
alexrp Aug 2, 2025
907b5b7
compiler: remove medium code model workaround for loongarch64
alexrp Aug 2, 2025
e351ee3
Revert "llvm: workaround crashes in llvm loop optimizations"
alexrp Aug 2, 2025
367be37
std.Thread: make unreachable errors in sleep() clearer
alexrp Aug 4, 2025
af78c55
std: skip some failing tests on hexagon
alexrp Aug 4, 2025
59ee4e8
std.hash.xxhash: disable xxhash3 test on all mips64 targets
alexrp Aug 13, 2025
f6879c3
std.posix.test: fix mmap() test to use actual page size instead of 4096
alexrp Aug 4, 2025
f149112
test: expand C ABI test coverage to hexagon-linux-musl
alexrp Aug 4, 2025
0683e15
test: use long calls for hexagon-linux module tests
alexrp Aug 4, 2025
2cb412f
test: re-enable a bunch of vector behavior tests on hexagon
alexrp Aug 3, 2025
3a5b7a3
test: use -Wno-unterminated-string-initialization for cbe tests
alexrp Jul 22, 2025
0071917
test: disable some varargs behavior tests on RISC-V due to LLVM 21 re…
alexrp Aug 28, 2025
66b4323
std: disable `sha3-512 single` test on RISC-V with V support
alexrp Aug 30, 2025
d2a038c
stage1: update zig1.wasm
alexrp Aug 5, 2025
8896046
ci: update tarballs to 0.16.0-dev.104+689461e31
alexrp Aug 28, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,9 @@ else()
set(ZIG_SYSTEM_LIBCXX "stdc++" CACHE STRING "system libcxx name for build.zig")
endif()

find_package(llvm 20)
find_package(clang 20)
find_package(lld 20)
find_package(llvm 21)
find_package(clang 21)
find_package(lld 21)

if(ZIG_STATIC_ZLIB)
if (MSVC)
Expand Down
22 changes: 12 additions & 10 deletions build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -1176,7 +1176,6 @@ const clang_libs = [_][]const u8{
"clangBasic",
"clangEdit",
"clangLex",
"clangARCMigrate",
"clangRewriteFrontend",
"clangRewrite",
"clangCrossTU",
Expand Down Expand Up @@ -1322,30 +1321,31 @@ const llvm_libs = [_][]const u8{
"LLVMOrcTargetProcess",
"LLVMOrcShared",
"LLVMDWP",
"LLVMDWARFCFIChecker",
"LLVMDebugInfoLogicalView",
"LLVMDebugInfoGSYM",
"LLVMOption",
"LLVMObjectYAML",
"LLVMObjCopy",
"LLVMMCA",
"LLVMMCDisassembler",
"LLVMLTO",
"LLVMFrontendOpenACC",
"LLVMFrontendHLSL",
"LLVMFrontendDriver",
"LLVMExtensions",
"LLVMPasses",
"LLVMHipStdPar",
"LLVMCFGuard",
"LLVMCoroutines",
"LLVMCFGuard",
"LLVMipo",
"LLVMInstrumentation",
"LLVMVectorize",
"LLVMSandboxIR",
"LLVMLinker",
"LLVMInstrumentation",
"LLVMFrontendOpenMP",
"LLVMFrontendOffloading",
"LLVMFrontendOpenACC",
"LLVMFrontendHLSL",
"LLVMFrontendDriver",
"LLVMFrontendDirective",
"LLVMFrontendAtomic",
"LLVMExtensions",
"LLVMFrontendOffloading",
"LLVMObjectYAML",
"LLVMDWARFLinkerParallel",
"LLVMDWARFLinkerClassic",
"LLVMDWARFLinker",
Expand Down Expand Up @@ -1374,7 +1374,9 @@ const llvm_libs = [_][]const u8{
"LLVMDebugInfoPDB",
"LLVMDebugInfoMSF",
"LLVMDebugInfoCodeView",
"LLVMDebugInfoGSYM",
"LLVMDebugInfoDWARF",
"LLVMDebugInfoDWARFLowLevel",
"LLVMObject",
"LLVMTextAPI",
"LLVMMCParser",
Expand Down
2 changes: 1 addition & 1 deletion ci/aarch64-linux-debug.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ set -e
ARCH="$(uname -m)"
TARGET="$ARCH-linux-musl"
MCPU="baseline"
CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.15.0-dev.233+7c85dc460"
CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.16.0-dev.104+689461e31"
PREFIX="$HOME/deps/$CACHE_BASENAME"
ZIG="$PREFIX/bin/zig"

Expand Down
2 changes: 1 addition & 1 deletion ci/aarch64-linux-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ set -e
ARCH="$(uname -m)"
TARGET="$ARCH-linux-musl"
MCPU="baseline"
CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.15.0-dev.233+7c85dc460"
CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.16.0-dev.104+689461e31"
PREFIX="$HOME/deps/$CACHE_BASENAME"
ZIG="$PREFIX/bin/zig"

Expand Down
2 changes: 1 addition & 1 deletion ci/aarch64-macos-debug.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ set -e
ZIGDIR="$PWD"
TARGET="$ARCH-macos-none"
MCPU="baseline"
CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.15.0-dev.233+7c85dc460"
CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.16.0-dev.104+689461e31"
PREFIX="$HOME/$CACHE_BASENAME"
ZIG="$PREFIX/bin/zig"

Expand Down
2 changes: 1 addition & 1 deletion ci/aarch64-macos-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ set -e
ZIGDIR="$PWD"
TARGET="$ARCH-macos-none"
MCPU="baseline"
CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.15.0-dev.233+7c85dc460"
CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.16.0-dev.104+689461e31"
PREFIX="$HOME/$CACHE_BASENAME"
ZIG="$PREFIX/bin/zig"

Expand Down
2 changes: 1 addition & 1 deletion ci/aarch64-windows.ps1
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
$TARGET = "$($Env:ARCH)-windows-gnu"
$ZIG_LLVM_CLANG_LLD_NAME = "zig+llvm+lld+clang-$TARGET-0.15.0-dev.233+7c85dc460"
$ZIG_LLVM_CLANG_LLD_NAME = "zig+llvm+lld+clang-$TARGET-0.16.0-dev.104+689461e31"
$MCPU = "baseline"
$ZIG_LLVM_CLANG_LLD_URL = "https://ziglang.org/deps/$ZIG_LLVM_CLANG_LLD_NAME.zip"
$PREFIX_PATH = "$(Get-Location)\..\$ZIG_LLVM_CLANG_LLD_NAME"
Expand Down
2 changes: 1 addition & 1 deletion ci/riscv64-linux-debug.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ set -e
ARCH="$(uname -m)"
TARGET="$ARCH-linux-musl"
MCPU="spacemit_x60"
CACHE_BASENAME="zig+llvm+lld+clang-riscv64-linux-musl-0.15.0-dev.929+31e46be74"
CACHE_BASENAME="zig+llvm+lld+clang-riscv64-linux-musl-0.16.0-dev.104+689461e31"
PREFIX="$HOME/deps/$CACHE_BASENAME"
ZIG="$PREFIX/bin/zig"

Expand Down
2 changes: 1 addition & 1 deletion ci/riscv64-linux-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ set -e
ARCH="$(uname -m)"
TARGET="$ARCH-linux-musl"
MCPU="spacemit_x60"
CACHE_BASENAME="zig+llvm+lld+clang-riscv64-linux-musl-0.15.0-dev.929+31e46be74"
CACHE_BASENAME="zig+llvm+lld+clang-riscv64-linux-musl-0.16.0-dev.104+689461e31"
PREFIX="$HOME/deps/$CACHE_BASENAME"
ZIG="$PREFIX/bin/zig"

Expand Down
2 changes: 1 addition & 1 deletion ci/x86_64-linux-debug-llvm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ set -e
ARCH="$(uname -m)"
TARGET="$ARCH-linux-musl"
MCPU="baseline"
CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.15.0-dev.233+7c85dc460"
CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.16.0-dev.104+689461e31"
PREFIX="$HOME/deps/$CACHE_BASENAME"
ZIG="$PREFIX/bin/zig"

Expand Down
2 changes: 1 addition & 1 deletion ci/x86_64-linux-debug.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ set -e
ARCH="$(uname -m)"
TARGET="$ARCH-linux-musl"
MCPU="baseline"
CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.15.0-dev.233+7c85dc460"
CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.16.0-dev.104+689461e31"
PREFIX="$HOME/deps/$CACHE_BASENAME"
ZIG="$PREFIX/bin/zig"

Expand Down
2 changes: 1 addition & 1 deletion ci/x86_64-linux-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ set -e
ARCH="$(uname -m)"
TARGET="$ARCH-linux-musl"
MCPU="baseline"
CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.15.0-dev.233+7c85dc460"
CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.16.0-dev.104+689461e31"
PREFIX="$HOME/deps/$CACHE_BASENAME"
ZIG="$PREFIX/bin/zig"

Expand Down
2 changes: 1 addition & 1 deletion ci/x86_64-macos-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ set -e
ZIGDIR="$PWD"
TARGET="$ARCH-macos-none"
MCPU="baseline"
CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.15.0-dev.233+7c85dc460"
CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.16.0-dev.104+689461e31"
PREFIX="$HOME/$CACHE_BASENAME"
JOBS="-j3"
ZIG="$PREFIX/bin/zig"
Expand Down
2 changes: 1 addition & 1 deletion ci/x86_64-windows-debug.ps1
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
$TARGET = "$($Env:ARCH)-windows-gnu"
$ZIG_LLVM_CLANG_LLD_NAME = "zig+llvm+lld+clang-$TARGET-0.15.0-dev.233+7c85dc460"
$ZIG_LLVM_CLANG_LLD_NAME = "zig+llvm+lld+clang-$TARGET-0.16.0-dev.104+689461e31"
$MCPU = "baseline"
$ZIG_LLVM_CLANG_LLD_URL = "https://ziglang.org/deps/$ZIG_LLVM_CLANG_LLD_NAME.zip"
$PREFIX_PATH = "$($Env:USERPROFILE)\$ZIG_LLVM_CLANG_LLD_NAME"
Expand Down
2 changes: 1 addition & 1 deletion ci/x86_64-windows-release.ps1
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
$TARGET = "$($Env:ARCH)-windows-gnu"
$ZIG_LLVM_CLANG_LLD_NAME = "zig+llvm+lld+clang-$TARGET-0.15.0-dev.233+7c85dc460"
$ZIG_LLVM_CLANG_LLD_NAME = "zig+llvm+lld+clang-$TARGET-0.16.0-dev.104+689461e31"
$MCPU = "baseline"
$ZIG_LLVM_CLANG_LLD_URL = "https://ziglang.org/deps/$ZIG_LLVM_CLANG_LLD_NAME.zip"
$PREFIX_PATH = "$($Env:USERPROFILE)\$ZIG_LLVM_CLANG_LLD_NAME"
Expand Down
9 changes: 4 additions & 5 deletions cmake/Findclang.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ find_path(CLANG_INCLUDE_DIRS NAMES clang/Frontend/ASTUnit.h
if(${LLVM_LINK_MODE} STREQUAL "shared")
find_library(CLANG_LIBRARIES
NAMES
libclang-cpp.so.20
libclang-cpp.so.20.1
clang-cpp-20.0
clang-cpp200
libclang-cpp.so.21
libclang-cpp.so.21.1
clang-cpp-21.0
clang-cpp210
clang-cpp
NAMES_PER_DIR
HINTS "${LLVM_LIBDIRS}"
Expand Down Expand Up @@ -60,7 +60,6 @@ else()
FIND_AND_ADD_CLANG_LIB(clangBasic)
FIND_AND_ADD_CLANG_LIB(clangEdit)
FIND_AND_ADD_CLANG_LIB(clangLex)
FIND_AND_ADD_CLANG_LIB(clangARCMigrate)
FIND_AND_ADD_CLANG_LIB(clangRewriteFrontend)
FIND_AND_ADD_CLANG_LIB(clangRewrite)
FIND_AND_ADD_CLANG_LIB(clangCrossTU)
Expand Down
38 changes: 19 additions & 19 deletions cmake/Findlld.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,23 @@
find_path(LLD_INCLUDE_DIRS NAMES lld/Common/Driver.h
HINTS ${LLVM_INCLUDE_DIRS}
PATHS
/usr/lib/llvm-20/include
/usr/local/llvm200/include
/usr/local/llvm20/include
/usr/local/opt/lld@20/include
/opt/homebrew/opt/lld@20/include
/home/linuxbrew/.linuxbrew/opt/lld@20/include
/usr/lib/llvm-21/include
/usr/local/llvm210/include
/usr/local/llvm21/include
/usr/local/opt/lld@21/include
/opt/homebrew/opt/lld@21/include
/home/linuxbrew/.linuxbrew/opt/lld@21/include
/mingw64/include)

find_library(LLD_LIBRARY NAMES lld-20.0 lld200 lld NAMES_PER_DIR
find_library(LLD_LIBRARY NAMES lld-21.0 lld210 lld NAMES_PER_DIR
HINTS ${LLVM_LIBDIRS}
PATHS
/usr/lib/llvm-20/lib
/usr/local/llvm200/lib
/usr/local/llvm20/lib
/usr/local/opt/lld@20/lib
/opt/homebrew/opt/lld@20/lib
/home/linuxbrew/.linuxbrew/opt/lld@20/lib
/usr/lib/llvm-21/lib
/usr/local/llvm210/lib
/usr/local/llvm21/lib
/usr/local/opt/lld@21/lib
/opt/homebrew/opt/lld@21/lib
/home/linuxbrew/.linuxbrew/opt/lld@21/lib
)
if(EXISTS ${LLD_LIBRARY})
set(LLD_LIBRARIES ${LLD_LIBRARY})
Expand All @@ -36,12 +36,12 @@ else()
HINTS ${LLVM_LIBDIRS}
PATHS
${LLD_LIBDIRS}
/usr/lib/llvm-20/lib
/usr/local/llvm200/lib
/usr/local/llvm20/lib
/usr/local/opt/lld@20/lib
/opt/homebrew/opt/lld@20/lib
/home/linuxbrew/.linuxbrew/opt/lld@20/lib
/usr/lib/llvm-21/lib
/usr/local/llvm210/lib
/usr/local/llvm21/lib
/usr/local/opt/lld@21/lib
/opt/homebrew/opt/lld@21/lib
/home/linuxbrew/.linuxbrew/opt/lld@21/lib
/mingw64/lib
/c/msys64/mingw64/lib
c:/msys64/mingw64/lib)
Expand Down
33 changes: 18 additions & 15 deletions cmake/Findllvm.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ if(ZIG_USE_LLVM_CONFIG)
# terminate when the right LLVM version is not found.
unset(LLVM_CONFIG_EXE CACHE)
find_program(LLVM_CONFIG_EXE
NAMES llvm-config-20 llvm-config-20.0 llvm-config200 llvm-config20 llvm-config NAMES_PER_DIR
NAMES llvm-config-21 llvm-config-21.0 llvm-config210 llvm-config21 llvm-config NAMES_PER_DIR
PATHS
"/mingw64/bin"
"/c/msys64/mingw64/bin"
"c:/msys64/mingw64/bin"
"C:/Libraries/llvm-20.0.0/bin")
"C:/Libraries/llvm-21.0.0/bin")

if ("${LLVM_CONFIG_EXE}" STREQUAL "LLVM_CONFIG_EXE-NOTFOUND")
if (NOT LLVM_CONFIG_ERROR_MESSAGES STREQUAL "")
Expand All @@ -40,9 +40,9 @@ if(ZIG_USE_LLVM_CONFIG)
OUTPUT_STRIP_TRAILING_WHITESPACE)

get_filename_component(LLVM_CONFIG_DIR "${LLVM_CONFIG_EXE}" DIRECTORY)
if("${LLVM_CONFIG_VERSION}" VERSION_LESS 20 OR "${LLVM_CONFIG_VERSION}" VERSION_EQUAL 21 OR "${LLVM_CONFIG_VERSION}" VERSION_GREATER 21)
if("${LLVM_CONFIG_VERSION}" VERSION_LESS 21 OR "${LLVM_CONFIG_VERSION}" VERSION_EQUAL 22 OR "${LLVM_CONFIG_VERSION}" VERSION_GREATER 22)
# Save the error message, in case this is the last llvm-config we find
list(APPEND LLVM_CONFIG_ERROR_MESSAGES "expected LLVM 20.x but found ${LLVM_CONFIG_VERSION} using ${LLVM_CONFIG_EXE}")
list(APPEND LLVM_CONFIG_ERROR_MESSAGES "expected LLVM 21.x but found ${LLVM_CONFIG_VERSION} using ${LLVM_CONFIG_EXE}")

# Ignore this directory and try the search again
list(APPEND CMAKE_IGNORE_PATH "${LLVM_CONFIG_DIR}")
Expand All @@ -66,9 +66,9 @@ if(ZIG_USE_LLVM_CONFIG)
if (LLVM_CONFIG_ERROR)
# Save the error message, in case this is the last llvm-config we find
if (ZIG_SHARED_LLVM)
list(APPEND LLVM_CONFIG_ERROR_MESSAGES "LLVM 20.x found at ${LLVM_CONFIG_EXE} does not support linking as a shared library")
list(APPEND LLVM_CONFIG_ERROR_MESSAGES "LLVM 21.x found at ${LLVM_CONFIG_EXE} does not support linking as a shared library")
else()
list(APPEND LLVM_CONFIG_ERROR_MESSAGES "LLVM 20.x found at ${LLVM_CONFIG_EXE} does not support linking as a static library")
list(APPEND LLVM_CONFIG_ERROR_MESSAGES "LLVM 21.x found at ${LLVM_CONFIG_EXE} does not support linking as a static library")
endif()

# Ignore this directory and try the search again
Expand Down Expand Up @@ -315,30 +315,31 @@ else()
FIND_AND_ADD_LLVM_LIB(LLVMOrcTargetProcess)
FIND_AND_ADD_LLVM_LIB(LLVMOrcShared)
FIND_AND_ADD_LLVM_LIB(LLVMDWP)
FIND_AND_ADD_LLVM_LIB(LLVMDWARFCFIChecker)
FIND_AND_ADD_LLVM_LIB(LLVMDebugInfoLogicalView)
FIND_AND_ADD_LLVM_LIB(LLVMDebugInfoGSYM)
FIND_AND_ADD_LLVM_LIB(LLVMOption)
FIND_AND_ADD_LLVM_LIB(LLVMObjectYAML)
FIND_AND_ADD_LLVM_LIB(LLVMObjCopy)
FIND_AND_ADD_LLVM_LIB(LLVMMCA)
FIND_AND_ADD_LLVM_LIB(LLVMMCDisassembler)
FIND_AND_ADD_LLVM_LIB(LLVMLTO)
FIND_AND_ADD_LLVM_LIB(LLVMFrontendOpenACC)
FIND_AND_ADD_LLVM_LIB(LLVMFrontendHLSL)
FIND_AND_ADD_LLVM_LIB(LLVMFrontendDriver)
FIND_AND_ADD_LLVM_LIB(LLVMExtensions)
FIND_AND_ADD_LLVM_LIB(LLVMPasses)
FIND_AND_ADD_LLVM_LIB(LLVMHipStdPar)
FIND_AND_ADD_LLVM_LIB(LLVMCFGuard)
FIND_AND_ADD_LLVM_LIB(LLVMCoroutines)
FIND_AND_ADD_LLVM_LIB(LLVMCFGuard)
FIND_AND_ADD_LLVM_LIB(LLVMipo)
FIND_AND_ADD_LLVM_LIB(LLVMInstrumentation)
FIND_AND_ADD_LLVM_LIB(LLVMVectorize)
FIND_AND_ADD_LLVM_LIB(LLVMSandboxIR)
FIND_AND_ADD_LLVM_LIB(LLVMLinker)
FIND_AND_ADD_LLVM_LIB(LLVMInstrumentation)
FIND_AND_ADD_LLVM_LIB(LLVMFrontendOpenMP)
FIND_AND_ADD_LLVM_LIB(LLVMFrontendOffloading)
FIND_AND_ADD_LLVM_LIB(LLVMFrontendOpenACC)
FIND_AND_ADD_LLVM_LIB(LLVMFrontendHLSL)
FIND_AND_ADD_LLVM_LIB(LLVMFrontendDriver)
FIND_AND_ADD_LLVM_LIB(LLVMFrontendDirective)
FIND_AND_ADD_LLVM_LIB(LLVMFrontendAtomic)
FIND_AND_ADD_LLVM_LIB(LLVMExtensions)
FIND_AND_ADD_LLVM_LIB(LLVMFrontendOffloading)
FIND_AND_ADD_LLVM_LIB(LLVMObjectYAML)
FIND_AND_ADD_LLVM_LIB(LLVMDWARFLinkerParallel)
FIND_AND_ADD_LLVM_LIB(LLVMDWARFLinkerClassic)
FIND_AND_ADD_LLVM_LIB(LLVMDWARFLinker)
Expand Down Expand Up @@ -367,7 +368,9 @@ else()
FIND_AND_ADD_LLVM_LIB(LLVMDebugInfoPDB)
FIND_AND_ADD_LLVM_LIB(LLVMDebugInfoMSF)
FIND_AND_ADD_LLVM_LIB(LLVMDebugInfoCodeView)
FIND_AND_ADD_LLVM_LIB(LLVMDebugInfoGSYM)
FIND_AND_ADD_LLVM_LIB(LLVMDebugInfoDWARF)
FIND_AND_ADD_LLVM_LIB(LLVMDebugInfoDWARFLowLevel)
FIND_AND_ADD_LLVM_LIB(LLVMObject)
FIND_AND_ADD_LLVM_LIB(LLVMTextAPI)
FIND_AND_ADD_LLVM_LIB(LLVMMCParser)
Expand Down
5 changes: 0 additions & 5 deletions lib/c/string.zig
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ const common = @import("common.zig");

comptime {
@export(&strcmp, .{ .name = "strcmp", .linkage = common.linkage, .visibility = common.visibility });
@export(&strlen, .{ .name = "strlen", .linkage = common.linkage, .visibility = common.visibility });
@export(&strncmp, .{ .name = "strncmp", .linkage = common.linkage, .visibility = common.visibility });
@export(&strcasecmp, .{ .name = "strcasecmp", .linkage = common.linkage, .visibility = common.visibility });
@export(&strncasecmp, .{ .name = "strncasecmp", .linkage = common.linkage, .visibility = common.visibility });
Expand Down Expand Up @@ -103,7 +102,3 @@ test strncmp {
try std.testing.expect(strncmp(@ptrCast("b"), @ptrCast("a"), 1) > 0);
try std.testing.expect(strncmp(@ptrCast("\xff"), @ptrCast("\x02"), 1) > 0);
}

fn strlen(s: [*:0]const c_char) callconv(.c) usize {
return std.mem.len(s);
}
1 change: 1 addition & 0 deletions lib/compiler/aro/aro/target.zig
Original file line number Diff line number Diff line change
Expand Up @@ -667,6 +667,7 @@ pub fn toLLVMTriple(target: std.Target, buf: []u8) []const u8 {
.driverkit => "driverkit",
.visionos => "xros",
.serenity => "serenity",
.managarm => "managarm",
.opencl,
.opengl,
.vulkan,
Expand Down
2 changes: 2 additions & 0 deletions lib/compiler_rt.zig
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,8 @@ comptime {
_ = @import("compiler_rt/memcmp.zig");
_ = @import("compiler_rt/bcmp.zig");
_ = @import("compiler_rt/ssp.zig");

_ = @import("compiler_rt/strlen.zig");
}

// Temporarily used for uefi until https://github.com/ziglang/zig/issues/21630 is addressed.
Expand Down
Loading