Skip to content

Commit 4406376

Browse files
committed
Merge branch 'sym-1.42.x' into symgc-1.42.x
Conflicts: .github/workflows/main.yml
2 parents 1fc34fa + 42dfc9c commit 4406376

7 files changed

Lines changed: 49 additions & 41 deletions

File tree

.circleci/config.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,13 @@ commonSteps: &commonSteps
9191
- run:
9292
name: Run defaultlib unittests & druntime integration tests
9393
when: always
94-
command: cd ../build && ctest -j$PARALLELISM --output-on-failure -E "dmd-testsuite|ldc2-unittest|lit-tests" --timeout 120
94+
command: |
95+
set -ux
96+
excludes='dmd-testsuite|lit-tests|ldc2-unittest'
97+
# FIXME: https://github.com/dlang/phobos/issues/10730
98+
excludes+='|^std.experimental.allocator.building_blocks.allocator_list'
99+
cd ../build
100+
ctest -j$PARALLELISM --output-on-failure -E "$excludes" --timeout 120
95101
96102
version: 2
97103
jobs:

.cirrus.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,9 @@ common_steps_template: &COMMON_STEPS_TEMPLATE
4949
run_defaultlib_tests_script: |
5050
# Run defaultlib unittests & druntime integration tests
5151
cd $CIRRUS_WORKING_DIR/../build
52-
excludes="dmd-testsuite|lit-tests|ldc2-unittest"
53-
if [[ "$CI_OS" == "freebsd" ]]; then
54-
# FIXME: https://github.com/dlang/phobos/issues/10730
55-
excludes+='|^std.experimental.allocator.building_blocks.allocator_list'
56-
fi
52+
excludes='dmd-testsuite|lit-tests|ldc2-unittest'
53+
# FIXME: https://github.com/dlang/phobos/issues/10730
54+
excludes+='|^std.experimental.allocator.building_blocks.allocator_list'
5755
ctest -j$PARALLELISM --output-on-failure -E "$excludes" --timeout 120
5856
5957
# Performs the extra packaging steps for jobs producing a prebuilt package.

.github/actions/1-setup/action.yml

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ name: Install prerequisites
22
inputs:
33
llvm_version:
44
required: true
5+
clang_major:
6+
required: true
57
arch:
68
required: true
79
runs:
@@ -37,39 +39,41 @@ runs:
3739
# Make sure to link libzstd statically
3840
sudo rm /usr/lib/$arch-linux-gnu/libzstd.so
3941
40-
- name: 'Linux: Install clang 21 from apt.llvm.org'
42+
- name: 'Linux: Install clang ${{ inputs.clang_major }} from apt.llvm.org'
4143
if: runner.os == 'Linux'
4244
shell: bash
4345
run: |
4446
set -eux
4547
cd ..
4648
curl -fL --retry 3 --max-time 30 -O https://apt.llvm.org/llvm.sh
47-
sudo bash llvm.sh 21
49+
sudo bash llvm.sh ${{ inputs.clang_major }}
4850
for tool in clang clang++ ld.lld; do
49-
sudo ln -sf $tool-21 /usr/bin/$tool
51+
sudo ln -sf $tool-${{ inputs.clang_major }} /usr/bin/$tool
5052
$tool --version
5153
done
52-
- name: 'macOS: Install Homebrew clang and lld 21' # see mimalloc comment in ../3-build-native/action.yml
54+
- name: 'macOS: Install Homebrew clang and lld ${{ inputs.clang_major }}' # see mimalloc comment in ../3-build-native/action.yml
5355
if: runner.os == 'macOS'
5456
shell: bash
5557
run: |
5658
set -eux
57-
brew install llvm@21 lld@21
59+
major='${{ inputs.clang_major }}'
60+
brew install llvm@$major lld@$major
5861
# https://github.com/llvm/llvm-project/issues/155531#issuecomment-3229499205
5962
if [[ '${{ inputs.arch }}' == arm64 ]]; then
60-
prefix="/opt/homebrew/opt/llvm"
63+
prefix="/opt/homebrew/opt/llvm@$major"
6164
else
62-
prefix="/usr/local/opt/llvm"
65+
prefix="/usr/local/opt/llvm@$major"
6366
fi
6467
rm -rf "$prefix/include/c++/v1"
65-
- name: 'Windows: Install clang 21 from GitHub'
68+
- name: 'Windows: Install clang ${{ inputs.clang_major }} from GitHub'
6669
if: runner.os == 'Windows'
6770
shell: bash
6871
run: |
6972
set -eux
7073
cd ..
74+
version='${{ inputs.clang_major }}.1.8'
7175
curl -fL --retry 3 --max-time 300 -o clang.exe \
72-
https://github.com/llvm/llvm-project/releases/download/llvmorg-21.1.8/LLVM-21.1.8-win64.exe
76+
https://github.com/llvm/llvm-project/releases/download/llvmorg-$version/LLVM-$version-win64.exe
7377
./clang.exe //S # double-slash for bash
7478
rm clang.exe
7579
# C:\Program Files\LLVM\bin should already be in PATH

.github/actions/4d-test-libs/action.yml

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -18,25 +18,18 @@ runs:
1818
N=$(nproc)
1919
fi
2020
21-
excludes="dmd-testsuite|lit-tests|ldc2-unittest"
22-
if [[ '${{ runner.os }}-${{ inputs.arch }}' == Linux-x86_64 ]]; then
23-
# sporadically hanging since Ubuntu 22
24-
excludes+='|^core.thread-shared_32$'
25-
elif [[ '${{ runner.os }}-${{ inputs.arch }}' == Linux-aarch64 ]]; then
26-
# FIXME: sporadically hanging
27-
excludes+='|^core.thread-shared$'
21+
excludes='dmd-testsuite|lit-tests|ldc2-unittest'
22+
# FIXME: https://github.com/dlang/phobos/issues/10730
23+
excludes+='|^std.experimental.allocator.building_blocks.allocator_list'
24+
if [[ '${{ runner.os }}-${{ inputs.arch }}' == Linux-aarch64 ]]; then
2825
if type -P apk &>/dev/null; then
2926
# FIXME: empty exception backtraces on musl AArch64 with enabled optimizations
3027
excludes+='|^druntime-test-exceptions-release$'
3128
fi
3229
fi
33-
if [[ '${{ runner.os }}' == macOS ]]; then
34-
# FIXME: https://github.com/dlang/phobos/issues/10730
35-
excludes+='|^std.experimental.allocator.building_blocks.allocator_list'
36-
if [[ '${{ inputs.arch }}' == x86_64 ]]; then
37-
# FIXME: regressed with image bump from macos-13 to macos-15-intel, apparently wrt. getpwnam_r() setting unexpected errno
38-
excludes+='|^std.path'
39-
fi
30+
if [[ '${{ runner.os }}-${{ inputs.arch }}' == macOS-x86_64 ]]; then
31+
# FIXME: regressed with image bump from macos-13 to macos-15-intel, apparently wrt. getpwnam_r() setting unexpected errno
32+
excludes+='|^std.path'
4033
fi
4134
4235
ctest -j$N --output-on-failure -E "$excludes" --timeout 120
@@ -55,4 +48,5 @@ runs:
5548
call "%LDC_VSDIR%\Common7\Tools\VsDevCmd.bat" -arch=${{ matrix.arch }} || exit /b
5649
echo on
5750
cd build || exit /b
58-
ctest -j4 --output-on-failure -E "dmd-testsuite|lit-tests|ldc2-unittest" --timeout 120 || exit /b
51+
# FIXME: https://github.com/dlang/phobos/issues/10730
52+
ctest -j4 --output-on-failure -E "dmd-testsuite|lit-tests|ldc2-unittest|^std.experimental.allocator.building_blocks.allocator_list" --timeout 120 || exit /b

.github/workflows/main.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ concurrency:
1616

1717
env:
1818
LLVM_VERSION: 21.1.8
19+
CLANG_MAJOR: 21
1920
DRT_GCOPT: gc:conservative
2021

2122
jobs:
@@ -103,8 +104,8 @@ jobs:
103104
# Additionally `-w` to suppress resulting linker warnings.
104105
extra_cmake_flags: >-
105106
-DCMAKE_OSX_SYSROOT=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
106-
-DCMAKE_C_COMPILER=/usr/local/opt/llvm/bin/clang
107-
-DCMAKE_CXX_COMPILER=/usr/local/opt/llvm/bin/clang++
107+
-DCMAKE_C_COMPILER=/usr/local/opt/llvm@${CLANG_MAJOR}/bin/clang
108+
-DCMAKE_CXX_COMPILER=/usr/local/opt/llvm@${CLANG_MAJOR}/bin/clang++
108109
-DD_COMPILER_FLAGS="-O -flto=full -defaultlib=phobos2-ldc-lto,druntime-ldc-lto -L-exported_symbol '-L__*' -L-w"
109110
-DEXTRA_CXXFLAGS=-flto=full
110111
with_pgo: true
@@ -114,8 +115,8 @@ jobs:
114115
arch: arm64
115116
extra_cmake_flags: >-
116117
-DCMAKE_OSX_SYSROOT=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
117-
-DCMAKE_C_COMPILER=/opt/homebrew/opt/llvm/bin/clang
118-
-DCMAKE_CXX_COMPILER=/opt/homebrew/opt/llvm/bin/clang++
118+
-DCMAKE_C_COMPILER=/opt/homebrew/opt/llvm@${CLANG_MAJOR}/bin/clang
119+
-DCMAKE_CXX_COMPILER=/opt/homebrew/opt/llvm@${CLANG_MAJOR}/bin/clang++
119120
-DD_COMPILER_FLAGS="-O -flto=full -defaultlib=phobos2-ldc-lto,druntime-ldc-lto -L-exported_symbol '-L__*' -L-w"
120121
-DEXTRA_CXXFLAGS=-flto=full
121122
with_pgo: true
@@ -194,6 +195,7 @@ jobs:
194195
uses: ./.github/actions/1-setup
195196
with:
196197
llvm_version: ${{ matrix.llvm_version || env.LLVM_VERSION }}
198+
clang_major: ${{ env.CLANG_MAJOR }}
197199
arch: ${{ matrix.arch }}
198200
- name: 'Ubuntu 22: Build recent gdb from source' # see https://github.com/ldc-developers/ldc/issues/4389
199201
if: startsWith(matrix.os, 'ubuntu-22.04')
@@ -311,6 +313,7 @@ jobs:
311313
uses: ./.github/actions/1-setup
312314
with:
313315
llvm_version: ${{ env.LLVM_VERSION }}
316+
clang_major: ${{ env.CLANG_MAJOR }}
314317
arch: x86_64
315318
- name: Build bootstrap LDC
316319
uses: ./.github/actions/2-build-bootstrap

.github/workflows/supported_llvm_versions.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -165,14 +165,10 @@ jobs:
165165
run: |
166166
set -eux
167167
excludes='dmd-testsuite|lit-tests|ldc2-unittest'
168+
# FIXME: https://github.com/dlang/phobos/issues/10730
169+
excludes+='|^std.experimental.allocator.building_blocks.allocator_list'
168170
if [[ '${{ runner.os }}' == macOS ]]; then
169171
N=$(sysctl -n hw.logicalcpu)
170-
if [[ '${{ matrix.os }}' == macos-14 ]]; then
171-
# FIXME: crashes frequently with enabled optimizations on M1 runners
172-
excludes+='|^std.internal.math.gammafunction(-shared)?$'
173-
fi
174-
# FIXME: https://github.com/dlang/phobos/issues/10730
175-
excludes+='|^std.experimental.allocator.building_blocks.allocator_list'
176172
else
177173
N=$(nproc)
178174
fi

runtime/druntime/src/core/thread/package.d

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,15 @@ unittest
3434

3535
auto thr = new Thread(()
3636
{
37-
while (!*f)
37+
version (LDC) // don't optimize to a single load with -O
3838
{
39+
while (!atomicLoad(*f)) {}
40+
}
41+
else
42+
{
43+
while (!*f)
44+
{
45+
}
3946
}
4047

4148
atomicFence();

0 commit comments

Comments
 (0)