Skip to content

Commit cd9f493

Browse files
committed
[CI: Make workaround for #3901 a bit less ugly]
1 parent 36d6f58 commit cd9f493

File tree

2 files changed

+3
-9
lines changed

2 files changed

+3
-9
lines changed

.github/actions/helper-build-ldc/action.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,14 @@ runs:
3030
installDir="$PWD/install"
3131
mkdir '${{ inputs.build_dir }}'
3232
cd '${{ inputs.build_dir }}'
33+
# wrt. CMAKE_C[XX]_COMPILER for Apple: https://github.com/ldc-developers/ldc/issues/3901
3334
cmake -G Ninja ../ldc \
3435
-DCMAKE_BUILD_TYPE=Release \
3536
-DLLVM_ROOT_DIR="$PWD/../${{ inputs.llvm_dir }}" \
3637
-DD_COMPILER='${{ inputs.host_dc }}' \
3738
-DLDC_LINK_MANUALLY=OFF \
39+
${{ runner.os == 'macOS' && '-DCMAKE_C_COMPILER=/usr/bin/cc' || '' }} \
40+
${{ runner.os == 'macOS' && '-DCMAKE_CXX_COMPILER=/usr/bin/c++' || '' }} \
3841
${{ inputs.specify_install_dir == 'true' && '-DCMAKE_INSTALL_PREFIX="$installDir"' || '' }} \
3942
${{ inputs.specify_install_dir == 'true' && '-DINCLUDE_INSTALL_DIR="$installDir/import"' || '' }} \
4043
${{ inputs.cmake_flags }}

.github/workflows/main.yml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -39,18 +39,13 @@ jobs:
3939
- job_name: macOS x86_64
4040
os: macos-12
4141
arch: x86_64
42-
# wrt. CMAKE_C[XX]_COMPILER: https://github.com/ldc-developers/ldc/issues/3901
4342
bootstrap_cmake_flags: >-
4443
-DBUILD_LTO_LIBS=ON
45-
-DCMAKE_C_COMPILER=/usr/bin/cc
46-
-DCMAKE_CXX_COMPILER=/usr/bin/c++
4744
# https://github.com/ldc-developers/ldc/issues/4462:
4845
# When using LTO, we need to explicitly export ~all symbols for plugin support via `ld64 -exported_symbol '__*'`.
4946
# Additionally `-w` to suppress resulting linker warnings.
5047
extra_cmake_flags: >-
5148
-DBUILD_LTO_LIBS=ON
52-
-DCMAKE_C_COMPILER=/usr/bin/cc
53-
-DCMAKE_CXX_COMPILER=/usr/bin/c++
5449
-DD_COMPILER_FLAGS="-O -flto=full -defaultlib=phobos2-ldc-lto,druntime-ldc-lto -L-exported_symbol '-L__*' -L-w"
5550
-DEXTRA_CXXFLAGS=-flto=full
5651
with_pgo: true
@@ -60,12 +55,8 @@ jobs:
6055
arch: arm64
6156
bootstrap_cmake_flags: >-
6257
-DBUILD_LTO_LIBS=ON
63-
-DCMAKE_C_COMPILER=/usr/bin/cc
64-
-DCMAKE_CXX_COMPILER=/usr/bin/c++
6558
extra_cmake_flags: >-
6659
-DBUILD_LTO_LIBS=ON
67-
-DCMAKE_C_COMPILER=/usr/bin/cc
68-
-DCMAKE_CXX_COMPILER=/usr/bin/c++
6960
-DD_COMPILER_FLAGS="-O -flto=full -defaultlib=phobos2-ldc-lto,druntime-ldc-lto -L-exported_symbol '-L__*' -L-w"
7061
-DEXTRA_CXXFLAGS=-flto=full
7162
with_pgo: true

0 commit comments

Comments
 (0)