Skip to content

Commit

Permalink
linux cross clang-rt support 7
Browse files Browse the repository at this point in the history
  • Loading branch information
vszakats committed Oct 31, 2023
1 parent 2ca0530 commit 2f38d30
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion _build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1198,6 +1198,8 @@ build_single_target() {
_LIBS_GLOBAL="${_LIBS_GLOBAL} -lc ${ccrtlib}"
fi

ls -lA

if [ "${_CCRT}" = 'clang-rt' ]; then
if [ "${_TOOLCHAIN}" != 'llvm-apple' ]; then
if [ "${_CRT}" = 'musl' ] && [ "${_DISTRO}" = 'debian' ]; then
Expand All @@ -1208,7 +1210,7 @@ build_single_target() {
ccrtlib="$("clang${_CCSUFFIX}" -print-libgcc-file-name -rtlib=compiler-rt)" # /usr/lib/llvm-13/lib/clang/13.0.1/lib/linux/libclang_rt.builtins-aarch64.a
ccrtlib="$(basename "${ccrtlib}" | cut -c 4-)" # delete 'lib' prefix
ccrtlib="-l${ccrtlib%.*}" # clang_rt.builtins-aarch64 or gcc
elif [ -d my-pkg/usr/lib/clang ]; then # cross
elif [ -d 'my-pkg/usr/lib/clang' ]; then # cross
# If we have the target CPU's clang-rt package installed, use it:
ccrtdir="$(find \
"$(pwd)/my-pkg/usr/lib/clang" -mindepth 1 -maxdepth 1 -type d | sort | tail -n 1)" # ../my-pkg/usr/lib/clang/15/lib/linux
Expand Down
1 change: 1 addition & 0 deletions _ci-linux-debian.sh
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ if [ -n "${dl}" ]; then
apt-get --quiet 2 --option Dpkg::Use-Pty=0 download ${dl}
# libclang-common-15-dev_1%3a15.0.6-4+b1_amd64.deb
dpkg --extract ./*.deb my-pkg
find .
fi

./_build.sh

0 comments on commit 2f38d30

Please sign in to comment.