File tree Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -811,6 +811,11 @@ impl Build {
811811 if target. contains ( "apple-darwin" ) {
812812 base. push ( "-stdlib=libc++" . into ( ) ) ;
813813 }
814+
815+ // Required for LLVM to properly compile.
816+ if target. contains ( "apple-ios" ) {
817+ base. push ( "-miphoneos-version-min=10.0" . into ( ) ) ;
818+ }
814819
815820 // Work around an apparently bad MinGW / GCC optimization,
816821 // See: http://lists.llvm.org/pipermail/cfe-dev/2016-December/051980.html
Original file line number Diff line number Diff line change @@ -175,6 +175,14 @@ impl Step for Llvm {
175175 cfg. define ( "LLVM_ENABLE_ZLIB" , "OFF" ) ;
176176 }
177177
178+ // Are we compiling for iOS/tvOS?
179+ if target. contains ( "apple" ) && !target. contains ( "darwin" ) {
180+ cfg. define ( "CMAKE_OSX_SYSROOT" , "/" ) ;
181+ cfg. define ( "CMAKE_OSX_DEPLOYMENT_TARGET" , "" ) ;
182+ cfg. define ( "LLVM_ENABLE_PLUGINS" , "OFF" ) ; // Prevent cmake from adding -bundle to CFLAGS automatically.
183+ cfg. define ( "LLVM_ENABLE_ZLIB" , "OFF" ) ;
184+ }
185+
178186 if builder. config . llvm_thin_lto {
179187 cfg. define ( "LLVM_ENABLE_LTO" , "Thin" ) ;
180188 if !target. contains ( "apple" ) {
You can’t perform that action at this time.
0 commit comments