-
Notifications
You must be signed in to change notification settings - Fork 14.8k
Open
Labels
cmakeBuild system in general and CMake in particularBuild system in general and CMake in particularcompiler-rtplatform:macos
Description
I'm filing this bug as requested by @cjappl in #74394.
As noted in rust-lang/rust#122504 (comment), passing -mmacosx-version-min
as a command line seems to break arch detection for compiler-rt.
In compiler-rt/cmake/config-ix.cmake we have:
set(DARWIN_osx_MIN_VER_FLAG "-mmacosx-version-min")
string(REGEX MATCH "${DARWIN_osx_MIN_VER_FLAG}=([.0-9]+)"
MACOSX_VERSION_MIN_FLAG "${CMAKE_CXX_FLAGS}")
and then, later:
if(NOT MACOSX_VERSION_MIN_FLAG)
darwin_test_archs(osx
DARWIN_osx_ARCHS
${toolchain_arches})
message(STATUS "OSX supported arches: ${DARWIN_osx_ARCHS}")
So, specifying -mmacosx-version-min
on Darwin results in no architectures being detected for compiler-rt, and the build therefore fails.
This seems incorrect, and is currently preventing the Rust compiler from updating a key dependency -- the cc
crate for compiling C and C++ code.
@yln @vitalybuka and @petrhosek: can any of you shed some light here on whether this is expected behavior?
Metadata
Metadata
Assignees
Labels
cmakeBuild system in general and CMake in particularBuild system in general and CMake in particularcompiler-rtplatform:macos