Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
10 changes: 5 additions & 5 deletions .github/actions/1-setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ runs:
packages=( \
git-core cmake g++ \
libcurl4 libzstd-dev \
curl gdb p7zip-full tzdata unzip zip python3-pip \
curl gdb p7zip-full zstd tzdata unzip zip python3-pip \
)
if [[ $arch == x86_64 ]]; then
packages+=(g++-multilib libcurl4:i386)
Expand Down Expand Up @@ -111,11 +111,11 @@ runs:
elif [[ '${{ runner.os }}' == macOS ]]; then
os=osx
fi
curl -fL --retry 3 --max-time 300 -o llvm.tar.xz \
https://github.com/ldc-developers/llvm-project/releases/download/$tag/llvm-$version-$os-$arch$assertsSuffix.tar.xz
curl -fL --retry 3 --max-time 300 -o llvm.tar.zst \
https://github.com/ldc-developers/llvm-project/releases/download/$tag/llvm-$version-$os-$arch$assertsSuffix.tar.zst
mkdir llvm
tar -xf llvm.tar.xz --strip 1 -C llvm
rm llvm.tar.xz
tar -xf llvm.tar.zst --zstd --strip 1 -C llvm
rm llvm.tar.zst
fi

llvm/bin/llvm-config --version
Expand Down
13 changes: 8 additions & 5 deletions .github/actions/3-build-cross/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ inputs:
default: false
android_ndk_version:
required: false
default: r27c
default: r29
android_api_level:
required: false
default: 29
Expand Down Expand Up @@ -45,11 +45,11 @@ runs:
fi
fi

curl -fL --retry 3 --max-time 300 -o llvm-cross.tar.xz \
https://github.com/ldc-developers/llvm-project/releases/download/$tag/llvm-$version-${{ inputs.os }}-${{ inputs.arch }}$assertsSuffix.tar.xz
curl -fL --retry 3 --max-time 300 -o llvm-cross.tar.zst \
https://github.com/ldc-developers/llvm-project/releases/download/$tag/llvm-$version-${{ inputs.os }}-${{ inputs.arch }}$assertsSuffix.tar.zst
mkdir llvm-cross
tar -xf llvm-cross.tar.xz --strip 1 -C llvm-cross
rm llvm-cross.tar.xz
tar -xf llvm-cross.tar.zst --zstd --strip 1 -C llvm-cross
rm llvm-cross.tar.zst

- name: Make non-native llvm-config runnable on host
shell: bash
Expand Down Expand Up @@ -97,6 +97,9 @@ runs:
mv "android-ndk-$version" android-ndk
rm android-ndk.zip

# remove the implicit -fstack-protector-strong
sed -i 's|^ " -fstack-protector-strong"$||' android-ndk/build/cmake/flags.cmake

arch='${{ inputs.arch }}'
apiLevel='${{ inputs.android_api_level }}'
cmakeFlags="-DTARGET_SYSTEM='Android;Linux;UNIX'"
Expand Down
6 changes: 3 additions & 3 deletions .github/actions/3-build-cross/android-llvm-config.in
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ Typical components:
version=@LLVM_VERSION@
prefix=@LLVM_INSTALL_DIR@
has_rtti=NO
CPPFLAGS="-I${prefix}/include -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS"
CPPFLAGS="-I${prefix}/include -DEXPERIMENTAL_KEY_INSTRUCTIONS -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS"
CFLAGS="${CPPFLAGS} ${CFLAGS}"
CXXFLAGS="${CFLAGS} -std=c++17 -fno-exceptions -funwind-tables"
CXXFLAGS="${CFLAGS} -std=c++17 --stdlib=libc++ -fno-exceptions -funwind-tables"
if [ "$has_rtti" != "YES" ]; then CXXFLAGS="$CXXFLAGS -fno-rtti"; fi
LDFLAGS="-L${prefix}/lib"
LIBFILE="${prefix}/lib/libLLVM-$version.so"
Expand All @@ -70,7 +70,7 @@ handle_args () {
cflags) echo "$CFLAGS";;
cxxflags) echo "$CXXFLAGS";;
ldflags) echo "$LDFLAGS";;
system-libs) echo "-lc -ldl -lz -lm";;
system-libs) echo "-ldl -lm -lz";;
libs) echo "$libs";;
libnames) echo "libLLVM-$version.so";;
libfiles) echo "$LIBFILE";;
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/helper-build-ldc/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ runs:
${{ inputs.specify_install_dir == 'true' && '-DINCLUDE_INSTALL_DIR="$installDir/import"' || '' }} \
${{ inputs.cmake_flags }}

ninja obj/ldc2.o ${{ inputs.build_targets }}
ninja -v obj/ldc2.o ${{ inputs.build_targets }}

# Windows: invoke CMake & ninja in MSVC env
- if: runner.os == 'Windows'
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: 21.1.8
LLVM_VERSION: f8faf15f

jobs:
build-native:
Expand Down Expand Up @@ -296,6 +296,8 @@ jobs:
android_x86_arch: x86_64
extra_cmake_flags: >-
-DLDC_INSTALL_LLVM_RUNTIME_LIBS_ARCH=aarch64-android
-DLDC_WITH_LLD=OFF
-DCMAKE_BUILD_TYPE=RelWithDebInfo

name: ${{ matrix.job_name }}
runs-on: ${{ matrix.host_os }}
Expand Down