@@ -76,20 +76,18 @@ jobs:
76
76
# https://github.com/ldc-developers/ldc/issues/4462:
77
77
# When using LTO, we need to explicitly export ~all symbols for plugin support via `ld64 -exported_symbol '__*'`.
78
78
# Additionally `-w` to suppress resulting linker warnings.
79
- #
80
- # We also need to work around issues with the used LDC v1.35.0 host/bootstrap compiler:
81
- # * Specify a macOS triple with OS version. And exclude LTO-able host druntime/Phobos because precompiled without OS version.
82
- # * Manually specify the path to the bundled libLTO.dylib (broken for *universal* packages for LDC <= v1.40.0).
83
79
extra_cmake_flags : >-
84
- -DD_COMPILER_FLAGS="-O -flto=full -L-exported_symbol '-L__*' -L-w -flto-binary=$PWD/../bootstrap-ldc/lib-x86_64/libLTO.dylib -mtriple=x86_64-apple-macos$MACOSX_DEPLOYMENT_TARGET "
80
+ -DD_COMPILER_FLAGS="-O -flto=full -defaultlib=phobos2-ldc-lto,druntime-ldc-lto - L-exported_symbol '-L__*' -L-w"
85
81
-DEXTRA_CXXFLAGS=-flto=full
86
82
with_pgo : true
87
83
88
84
- job_name : macOS arm64
89
85
os : macos-14
90
86
arch : arm64
91
87
extra_cmake_flags : >-
92
- -DD_COMPILER_FLAGS="-O -flto=full -defaultlib=phobos2-ldc-lto,druntime-ldc-lto -L-exported_symbol '-L__*' -L-w -flto-binary=$PWD/../bootstrap-ldc/lib-arm64/libLTO.dylib"
88
+ -DCMAKE_C_COMPILER=/opt/homebrew/opt/llvm@19/bin/clang
89
+ -DCMAKE_CXX_COMPILER=/opt/homebrew/opt/llvm@19/bin/clang++
90
+ -DD_COMPILER_FLAGS="-O -flto=full -defaultlib=phobos2-ldc-lto,druntime-ldc-lto -L-exported_symbol '-L__*' -L-w"
93
91
-DEXTRA_CXXFLAGS=-flto=full
94
92
with_pgo : true
95
93
@@ -161,25 +159,14 @@ jobs:
161
159
uses : ./.github/actions/helper-build-gdb
162
160
with :
163
161
arch : ${{ matrix.arch }}
162
+ - name : ' macOS arm64: Switch to Xcode 16'
163
+ if : runner.os == 'macOS' && matrix.arch == 'arm64'
164
+ run : sudo xcode-select -switch /Applications/Xcode_16.1.app
164
165
- name : Build bootstrap LDC
165
- if : runner.os != 'macOS'
166
166
uses : ./.github/actions/2-build-bootstrap
167
167
with :
168
168
cmake_flags : -DBUILD_LTO_LIBS=ON ${{ matrix.base_cmake_flags }}
169
169
arch : ${{ matrix.arch }}
170
- # FIXME: on macOS, mixing newer LLVM from bootstrap LDC with older LLVM from Xcode clang is problematic,
171
- # leading to sporadic 'libc++abi: Pure virtual function called!' compiler crashes etc.
172
- - name : ' macOS: Use host LDC (with Xcode-compatible LLVM version) as bootstrap LDC'
173
- if : runner.os == 'macOS'
174
- run : |
175
- ln -s $(dirname $(dirname $(which ldmd2))) ../bootstrap-ldc
176
- if [[ '${{ matrix.arch }}' == 'x86_64' ]]; then
177
- # work around a v1.35.0 bug - need to rename libLTO-ldc.dylib to make it loadable
178
- mv ../bootstrap-ldc/lib-x86_64/libLTO-ldc.dylib ../bootstrap-ldc/lib-x86_64/libLTO.dylib
179
- else
180
- # use Xcode v16 on arm64
181
- sudo xcode-select -switch /Applications/Xcode_16.1.app
182
- fi
183
170
- name : Build LDC with PGO instrumentation & gather profile from compiling default libs
184
171
if : matrix.with_pgo
185
172
uses : ./.github/actions/2a-build-pgo
0 commit comments