Skip to content

Commit

Permalink
Azure CI Mac: Try to overcome ldc-developers#3901 for macOS-11 image
Browse files Browse the repository at this point in the history
  • Loading branch information
kinke committed Mar 31, 2022
1 parent acc306a commit b646b4c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
9 changes: 6 additions & 3 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,12 @@ jobs:
variables:
CI_OS: osx
ARCH: x86_64
BOOTSTRAP_CMAKE_FLAGS: -DBUILD_LTO_LIBS=ON
BOOTSTRAP_CMAKE_FLAGS: >
-DBUILD_LTO_LIBS=ON
-DD_COMPILER_FLAGS=-gcc=/usr/bin/c++
EXTRA_CMAKE_FLAGS: >
-DBUILD_LTO_LIBS=ON
-DD_COMPILER_FLAGS="-O -flto=full -defaultlib=phobos2-ldc-lto,druntime-ldc-lto"
-DD_COMPILER_FLAGS="-gcc=/usr/bin/c++ -O -flto=full -defaultlib=phobos2-ldc-lto,druntime-ldc-lto"
-DEXTRA_CXXFLAGS=-flto=full
MACOSX_DEPLOYMENT_TARGET: 10.12
IOS_DEPLOYMENT_TARGET: 12.0
Expand All @@ -132,10 +134,11 @@ jobs:
- job: macOS_arm64
timeoutInMinutes: 120
pool:
vmImage: 'macOS-10.15'
vmImage: 'macOS-11'
variables:
CI_OS: osx
ARCH: arm64
BOOTSTRAP_CMAKE_FLAGS: -DD_COMPILER_FLAGS=-gcc=/usr/bin/c++
EXTRA_CMAKE_FLAGS: >
-DBUILD_LTO_LIBS=ON
-DD_COMPILER_FLAGS="-O -flto=full -defaultlib=phobos2-ldc-lto,druntime-ldc-lto"
Expand Down
2 changes: 1 addition & 1 deletion cmake/Modules/BuildDExecutable.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ function(build_d_executable target_name output_exe d_src_files compiler_args lin
translate_linker_args(full_linker_args translated_linker_args)

# We need to link against the C++ runtime library.
if(NOT MSVC AND "${D_COMPILER_ID}" STREQUAL "LDMD")
if(NOT MSVC AND "${D_COMPILER_ID}" STREQUAL "LDMD" AND NOT "${dflags}" MATCHES "(^|;)-gcc=")
set(translated_linker_args "-gcc=${CMAKE_CXX_COMPILER}" ${translated_linker_args})
endif()

Expand Down

0 comments on commit b646b4c

Please sign in to comment.