Skip to content

Commit b646b4c

Browse files
committed
Azure CI Mac: Try to overcome #3901 for macOS-11 image
1 parent acc306a commit b646b4c

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

azure-pipelines.yml

+6-3
Original file line numberDiff line numberDiff line change
@@ -103,10 +103,12 @@ jobs:
103103
variables:
104104
CI_OS: osx
105105
ARCH: x86_64
106-
BOOTSTRAP_CMAKE_FLAGS: -DBUILD_LTO_LIBS=ON
106+
BOOTSTRAP_CMAKE_FLAGS: >
107+
-DBUILD_LTO_LIBS=ON
108+
-DD_COMPILER_FLAGS=-gcc=/usr/bin/c++
107109
EXTRA_CMAKE_FLAGS: >
108110
-DBUILD_LTO_LIBS=ON
109-
-DD_COMPILER_FLAGS="-O -flto=full -defaultlib=phobos2-ldc-lto,druntime-ldc-lto"
111+
-DD_COMPILER_FLAGS="-gcc=/usr/bin/c++ -O -flto=full -defaultlib=phobos2-ldc-lto,druntime-ldc-lto"
110112
-DEXTRA_CXXFLAGS=-flto=full
111113
MACOSX_DEPLOYMENT_TARGET: 10.12
112114
IOS_DEPLOYMENT_TARGET: 12.0
@@ -132,10 +134,11 @@ jobs:
132134
- job: macOS_arm64
133135
timeoutInMinutes: 120
134136
pool:
135-
vmImage: 'macOS-10.15'
137+
vmImage: 'macOS-11'
136138
variables:
137139
CI_OS: osx
138140
ARCH: arm64
141+
BOOTSTRAP_CMAKE_FLAGS: -DD_COMPILER_FLAGS=-gcc=/usr/bin/c++
139142
EXTRA_CMAKE_FLAGS: >
140143
-DBUILD_LTO_LIBS=ON
141144
-DD_COMPILER_FLAGS="-O -flto=full -defaultlib=phobos2-ldc-lto,druntime-ldc-lto"

cmake/Modules/BuildDExecutable.cmake

+1-1
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ function(build_d_executable target_name output_exe d_src_files compiler_args lin
9494
translate_linker_args(full_linker_args translated_linker_args)
9595

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

0 commit comments

Comments
 (0)