@@ -702,13 +702,20 @@ fn configure_cmake(
702702 // macOS
703703 cfg. define ( "CMAKE_SYSTEM_NAME" , "Darwin" ) ;
704704 } else if target. contains ( "ios" ) {
705- cfg. define ( "CMAKE_SYSTEM_NAME" , "iOS" ) ;
705+ // FIXME(madsmtm): compiler-rt's CMake setup is kinda weird, it seems like they do
706+ // version testing etc. for macOS (i.e. Darwin), even while building for iOS?
707+ //
708+ // So for now we set it to "Darwin", but ideally this should be set to "iOS".
709+ cfg. define ( "CMAKE_SYSTEM_NAME" , "Darwin" ) ;
706710 } else if target. contains ( "tvos" ) {
707- cfg. define ( "CMAKE_SYSTEM_NAME" , "tvOS" ) ;
711+ // FIXME(madsmtm): See above, we should be using "tvOS" here.
712+ cfg. define ( "CMAKE_SYSTEM_NAME" , "Darwin" ) ;
708713 } else if target. contains ( "visionos" ) {
709- cfg. define ( "CMAKE_SYSTEM_NAME" , "visionOS" ) ;
714+ // FIXME(madsmtm): See above, we should be using "visionOS" here.
715+ cfg. define ( "CMAKE_SYSTEM_NAME" , "Darwin" ) ;
710716 } else if target. contains ( "watchos" ) {
711- cfg. define ( "CMAKE_SYSTEM_NAME" , "watchOS" ) ;
717+ // FIXME(madsmtm): See above, we should be using "watchOS" here.
718+ cfg. define ( "CMAKE_SYSTEM_NAME" , "Darwin" ) ;
712719 } else if target. contains ( "none" ) {
713720 // "none" should be the last branch
714721 cfg. define ( "CMAKE_SYSTEM_NAME" , "Generic" ) ;
0 commit comments