Skip to content

Commit 1e97540

Browse files
committed
[try skipping bootstrap-LDC build, use host compiler based on LLVM v17]
1 parent 667090c commit 1e97540

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,8 @@ runs:
110110
- name: Install D host compiler
111111
uses: dlang-community/setup-dlang@v1
112112
with:
113-
compiler: ldc-latest
113+
# macOS arm64: use LDC v1.39.0 using LLVM v17, as Xcode v16
114+
compiler: ${{ inputs.arch == 'arm64' && 'ldc-1.39.0' || 'ldc-latest' }}
114115
- name: 'Posix: Clear LD_LIBRARY_PATH env variable' # don't use host druntime/Phobos .so/.dylib etc.
115116
if: runner.os != 'Windows'
116117
shell: bash

.github/workflows/main.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,9 @@ jobs:
5959
-DD_COMPILER_FLAGS=-gcc=/usr/bin/c++
6060
extra_cmake_flags: >-
6161
-DBUILD_LTO_LIBS=ON
62-
-DD_COMPILER_FLAGS="-gcc=/usr/bin/c++ -L-exported_symbol '-L__*' -L-w"
63-
# -DD_COMPILER_FLAGS="-gcc=/usr/bin/c++ -O -flto=full -defaultlib=phobos2-ldc-lto,druntime-ldc-lto -L-exported_symbol '-L__*' -L-w"
64-
# -DEXTRA_CXXFLAGS="-flto=full -mno-stack-arg-probe -fno-stack-protector"
65-
#with_pgo: true
62+
-DD_COMPILER_FLAGS="-gcc=/usr/bin/c++ -O -flto=full -defaultlib=phobos2-ldc-lto,druntime-ldc-lto -L-exported_symbol '-L__*' -L-w"
63+
-DEXTRA_CXXFLAGS=-flto=full
64+
with_pgo: true
6665

6766
- job_name: Windows x64
6867
os: windows-2022
@@ -105,10 +104,14 @@ jobs:
105104
llvm_version: ${{ matrix.llvm_version || env.LLVM_VERSION }}
106105
arch: ${{ matrix.arch }}
107106
- name: Build bootstrap LDC
107+
if: matrix.os != 'macos-14'
108108
uses: ./.github/actions/2-build-bootstrap
109109
with:
110110
cmake_flags: ${{ matrix.bootstrap_cmake_flags }}
111111
arch: ${{ matrix.arch }}
112+
- name: 'macOS 14: Skip bootstrap LDC build'
113+
if: matrix.os == 'macos-14'
114+
run: ln -s $(dirname $(dirname $(which ldmd2))) ../bootstrap-ldc
112115
- name: Build LDC with PGO instrumentation & gather profile from compiling default libs
113116
if: matrix.with_pgo
114117
uses: ./.github/actions/2a-build-pgo

0 commit comments

Comments
 (0)