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 {
811
811
if target. contains ( "apple-darwin" ) {
812
812
base. push ( "-stdlib=libc++" . into ( ) ) ;
813
813
}
814
+
815
+ // Required for LLVM to properly compile.
816
+ if target. contains ( "apple-ios" ) {
817
+ base. push ( "-miphoneos-version-min=10.0" . into ( ) ) ;
818
+ }
814
819
815
820
// Work around an apparently bad MinGW / GCC optimization,
816
821
// 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 {
175
175
cfg. define ( "LLVM_ENABLE_ZLIB" , "OFF" ) ;
176
176
}
177
177
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
+
178
186
if builder. config . llvm_thin_lto {
179
187
cfg. define ( "LLVM_ENABLE_LTO" , "Thin" ) ;
180
188
if !target. contains ( "apple" ) {
You can’t perform that action at this time.
0 commit comments