@@ -162,9 +162,6 @@ function generate-cmake-libcxx-win() {
162162}
163163
164164function check-runtimes() {
165- echo " --- Installing libc++, libc++abi and libunwind to a fake location"
166- ${NINJA} -vC " ${BUILD_DIR} " install-cxx install-cxxabi install-unwind
167-
168165 echo " +++ Running the libc++ tests"
169166 ${NINJA} -vC " ${BUILD_DIR} " check-cxx
170167
@@ -173,6 +170,19 @@ function check-runtimes() {
173170
174171 echo " +++ Running the libunwind tests"
175172 ${NINJA} -vC " ${BUILD_DIR} " check-unwind
173+
174+ # TODO: On macOS 13.5, the linker seems to have an issue where it will pick up
175+ # a library if it exists inside a -L search path, even if we don't link
176+ # against that library. This happens with libunwind.dylib if it is built
177+ # at the point when we run the libc++ tests, which causes issues cause we
178+ # are also linking against the system unwinder.
179+ #
180+ # I believe this is a linker regression and I reported it as rdar://115842730.
181+ # It should be possible to move this installation step back to the top once
182+ # that issue has been resolved, but in the meantime it doesn't really hurt to
183+ # have it here.
184+ echo " --- Installing libc++, libc++abi and libunwind to a fake location"
185+ ${NINJA} -vC " ${BUILD_DIR} " install-cxx install-cxxabi install-unwind
176186}
177187
178188# TODO: The goal is to test this against all configurations. We should also move
0 commit comments