Skip to content
Merged
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
4 changes: 4 additions & 0 deletions .github/actions/4b-test-lit/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ runs:
# FIXME: the following tests fail
rm tests/debuginfo/nested_gdb.d
rm tests/sanitizers/fuzz_basic.d
if type -P apk &>/dev/null; then
# FIXME: empty exception backtrace on musl AArch64
rm tests/codegen/exception_stack_trace.d
fi
fi

cd ../build
Expand Down
14 changes: 12 additions & 2 deletions .github/actions/4c-test-dmd/action.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,25 @@
name: Run DMD testsuite
inputs:
arch:
required: false # Windows only
required: true
runs:
using: composite
steps:

- name: 'Posix: Run DMD testsuite'
if: runner.os != 'Windows'
shell: bash
run: cd ../build && ctest -V -R "dmd-testsuite"
run: |
set -eux

if [[ '${{ inputs.arch }}' == aarch64 ]] && type -P apk &>/dev/null; then
# FIXME: empty exception backtraces on musl AArch64 with enabled optimizations
rm tests/dmd/runnable/test19086.d
rm tests/dmd/runnable/test17559.d
fi

cd ../build
ctest -V -R "dmd-testsuite"

- name: 'Windows: Run DMD testsuite'
if: runner.os == 'Windows'
Expand Down
4 changes: 4 additions & 0 deletions .github/actions/4d-test-libs/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ runs:
elif [[ '${{ runner.os }}-${{ inputs.arch }}' == Linux-aarch64 ]]; then
# FIXME: sporadically hanging
excludes+='|^core.thread-shared$'
if type -P apk &>/dev/null; then
# FIXME: empty exception backtraces on musl AArch64 with enabled optimizations
excludes+='|^druntime-test-exceptions-release$'
fi
fi
if [[ '${{ runner.os }}' == macOS ]]; then
# FIXME: https://github.com/dlang/phobos/issues/10730
Expand Down
36 changes: 34 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,26 @@ jobs:
-DEXTRA_CXXFLAGS=-flto=full
with_pgo: true

- job_name: Alpine musl aarch64
os: ubuntu-24.04-arm
container_image: alpine:3.21
arch: aarch64
base_cmake_flags: >-
-DLDC_INSTALL_LLVM_RUNTIME_LIBS_ARCH=aarch64
-DLLVM_IS_SHARED=OFF
-DLDC_ENABLE_PLUGINS=OFF
-DLDC_DYNAMIC_COMPILE=OFF
extra_cmake_flags: >-
-DTEST_COMPILER_RT_LIBRARIES="profile;lsan;asan;msan;fuzzer"
-DLDC_INSTALL_LTOPLUGIN=OFF
-DLDC_FULLY_STATIC=ON
-DCMAKE_C_COMPILER=clang
-DCMAKE_CXX_COMPILER=clang++
-DCMAKE_EXE_LINKER_FLAGS=-static-libstdc++
-DD_COMPILER_FLAGS="-O -flto=full -defaultlib=phobos2-ldc-lto,druntime-ldc-lto"
-DEXTRA_CXXFLAGS=-flto=full
with_pgo: true

- job_name: macOS x86_64
os: macos-15-intel
arch: x86_64
Expand Down Expand Up @@ -116,7 +136,11 @@ jobs:

name: ${{ matrix.job_name }}
runs-on: ${{ matrix.os }}
container: ${{ matrix.container_image }}
container:
image: ${{ matrix.container_image }}
volumes: # needed for Alpine aarch64 job: https://github.com/actions/runner/issues/801#issuecomment-2976165281
- /opt:/opt:rw,rshared
- /opt:/__e/node20:ro,rshared
timeout-minutes: 90
env:
MACOSX_DEPLOYMENT_TARGET: ${{ matrix.arch == 'arm64' && '11.0' || '10.12' }}
Expand All @@ -138,10 +162,18 @@ jobs:
# create missing 7za symlink
ln -s 7z /usr/bin/7za
# make lld the default linker (note: /usr/bin/ld seems unused)
ln -sf /usr/bin/ld.lld /usr/x86_64-alpine-linux-musl/bin/ld
ln -sf /usr/bin/ld.lld /usr/${{ matrix.arch }}-alpine-linux-musl/bin/ld
# create ../llvm symlink to distro LLVM (no prebuilt LDC-LLVM for musl)
ln -s /usr/lib/llvm19 $(dirname $(pwd))/llvm
../llvm/bin/llvm-config --version

# see https://github.com/actions/runner/issues/801#issuecomment-2976165281
if [[ '${{ matrix.arch }}' == aarch64 ]]; then
sed -i "/^ID=/s/alpine/NotpineForGHA/" /etc/os-release
apk add nodejs --update-cache
mkdir /opt/bin
ln -s /usr/bin/node /opt/bin/node
fi
fi
- uses: actions/checkout@v4
with:
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#### Big news
- Frontend, druntime and Phobos are at version ~[2.112.0](https://dlang.org/changelog/2.112.0.html), incl. new command-line options `-extI`, `-dllimport=externalOnly` and `-edition`. (#4949, #4962, #4988, #5029)
- Support for [LLVM 21](https://releases.llvm.org/21.1.0/docs/ReleaseNotes.html). Beware that patch versions before v21.1.8 seem to misoptimize `std.json`. (#4950, #5033)
- New prebuilt package for Alpine Linux aarch64 with musl libc, analogous to the existing x86_64 package. (#4943)
- **Breaking change for dcompute**: The special `@kernel` UDA is now a function and _**requires**_ parentheses as in `@kernel() void foo(){}`. Optionally you can provide launch dimensions, `@kernel([2,4,8])`, to specify to the compute runtime how the kernel is intended to be launched.
- ldc2.conf can now be a directory. All the files inside it, ordered naturally, will be concatenated and treated like a big config. (#4954)
- Running `ldc-build-runtime --installWithSuffix` now includes installing a target-specific .conf file to that directory. (#4978)
Expand Down
4 changes: 2 additions & 2 deletions runtime/druntime/src/rt/dwarfeh.d
Original file line number Diff line number Diff line change
Expand Up @@ -564,7 +564,7 @@ extern (C) _Unwind_Reason_Code _d_eh_personality_common(_Unwind_Action actions,
{
auto eh = ExceptionHeader.toExceptionHeader(exceptionObject);
for (auto ehx = eh; ehx; ehx = ehx.next)
writeln(" eh: %p next=%014p lsda=%p '%.*s'", ehx, ehx.next, ehx.languageSpecificData, ehx.object.msg.length, ehx.object.msg.ptr);
writeln(" eh: %p next=%014p lsda=%p '%.*s'", ehx, ehx.next, ehx.languageSpecificData, cast(int) ehx.object.msg.length, ehx.object.msg.ptr);
}
}

Expand Down Expand Up @@ -657,7 +657,7 @@ extern (C) _Unwind_Reason_Code _d_eh_personality_common(_Unwind_Action actions,
if (exceptionClass == dmdExceptionClass)
{
auto eh = ExceptionHeader.toExceptionHeader(exceptionObject);
debug (EH_personality) writeln(" '%.*s' next = %p", eh.object.msg.length, eh.object.msg.ptr, eh.next);
debug (EH_personality) writeln(" '%.*s' next = %p", cast(int) eh.object.msg.length, eh.object.msg.ptr, eh.next);
auto currentLsd = language_specific_data;
bool bypassed = false;
while (eh.next)
Expand Down
2 changes: 1 addition & 1 deletion tests/codegen/exception_stack_trace.d
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ void main()
{
import core.stdc.stdio;
auto s = e.toString();
printf("%.*s\n", s.length, s.ptr);
printf("%.*s\n", cast(int) s.length, s.ptr);
}
}

Expand Down
Loading