Skip to content

Commit

Permalink
[CI: Make workaround for ldc-developers#3901 a bit less ugly]
Browse files Browse the repository at this point in the history
  • Loading branch information
kinke committed Sep 20, 2024
1 parent 36d6f58 commit cd9f493
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
3 changes: 3 additions & 0 deletions .github/actions/helper-build-ldc/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,14 @@ runs:
installDir="$PWD/install"
mkdir '${{ inputs.build_dir }}'
cd '${{ inputs.build_dir }}'
# wrt. CMAKE_C[XX]_COMPILER for Apple: https://github.com/ldc-developers/ldc/issues/3901
cmake -G Ninja ../ldc \
-DCMAKE_BUILD_TYPE=Release \
-DLLVM_ROOT_DIR="$PWD/../${{ inputs.llvm_dir }}" \
-DD_COMPILER='${{ inputs.host_dc }}' \
-DLDC_LINK_MANUALLY=OFF \
${{ runner.os == 'macOS' && '-DCMAKE_C_COMPILER=/usr/bin/cc' || '' }} \
${{ runner.os == 'macOS' && '-DCMAKE_CXX_COMPILER=/usr/bin/c++' || '' }} \
${{ inputs.specify_install_dir == 'true' && '-DCMAKE_INSTALL_PREFIX="$installDir"' || '' }} \
${{ inputs.specify_install_dir == 'true' && '-DINCLUDE_INSTALL_DIR="$installDir/import"' || '' }} \
${{ inputs.cmake_flags }}
Expand Down
9 changes: 0 additions & 9 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,18 +39,13 @@ jobs:
- job_name: macOS x86_64
os: macos-12
arch: x86_64
# wrt. CMAKE_C[XX]_COMPILER: https://github.com/ldc-developers/ldc/issues/3901
bootstrap_cmake_flags: >-
-DBUILD_LTO_LIBS=ON
-DCMAKE_C_COMPILER=/usr/bin/cc
-DCMAKE_CXX_COMPILER=/usr/bin/c++
# https://github.com/ldc-developers/ldc/issues/4462:
# When using LTO, we need to explicitly export ~all symbols for plugin support via `ld64 -exported_symbol '__*'`.
# Additionally `-w` to suppress resulting linker warnings.
extra_cmake_flags: >-
-DBUILD_LTO_LIBS=ON
-DCMAKE_C_COMPILER=/usr/bin/cc
-DCMAKE_CXX_COMPILER=/usr/bin/c++
-DD_COMPILER_FLAGS="-O -flto=full -defaultlib=phobos2-ldc-lto,druntime-ldc-lto -L-exported_symbol '-L__*' -L-w"
-DEXTRA_CXXFLAGS=-flto=full
with_pgo: true
Expand All @@ -60,12 +55,8 @@ jobs:
arch: arm64
bootstrap_cmake_flags: >-
-DBUILD_LTO_LIBS=ON
-DCMAKE_C_COMPILER=/usr/bin/cc
-DCMAKE_CXX_COMPILER=/usr/bin/c++
extra_cmake_flags: >-
-DBUILD_LTO_LIBS=ON
-DCMAKE_C_COMPILER=/usr/bin/cc
-DCMAKE_CXX_COMPILER=/usr/bin/c++
-DD_COMPILER_FLAGS="-O -flto=full -defaultlib=phobos2-ldc-lto,druntime-ldc-lto -L-exported_symbol '-L__*' -L-w"
-DEXTRA_CXXFLAGS=-flto=full
with_pgo: true
Expand Down

0 comments on commit cd9f493

Please sign in to comment.