Changes required for rustc/cargo to build for iOS targets
This commit is contained in:
parent
16957bd4d3
commit
e191358788
@ -811,6 +811,11 @@ impl Build {
|
||||
if target.contains("apple-darwin") {
|
||||
base.push("-stdlib=libc++".into());
|
||||
}
|
||||
|
||||
// Required for LLVM to properly compile.
|
||||
if target.contains("apple-ios") {
|
||||
base.push("-miphoneos-version-min=10.0".into());
|
||||
}
|
||||
|
||||
// Work around an apparently bad MinGW / GCC optimization,
|
||||
// See: http://lists.llvm.org/pipermail/cfe-dev/2016-December/051980.html
|
||||
|
@ -175,6 +175,14 @@ impl Step for Llvm {
|
||||
cfg.define("LLVM_ENABLE_ZLIB", "OFF");
|
||||
}
|
||||
|
||||
// Are we compiling for iOS/tvOS?
|
||||
if target.contains("apple") && !target.contains("darwin") {
|
||||
cfg.define("CMAKE_OSX_SYSROOT", "/");
|
||||
cfg.define("CMAKE_OSX_DEPLOYMENT_TARGET", "");
|
||||
cfg.define("LLVM_ENABLE_PLUGINS", "OFF"); // Prevent cmake from adding -bundle to CFLAGS automatically.
|
||||
cfg.define("LLVM_ENABLE_ZLIB", "OFF");
|
||||
}
|
||||
|
||||
if builder.config.llvm_thin_lto {
|
||||
cfg.define("LLVM_ENABLE_LTO", "Thin");
|
||||
if !target.contains("apple") {
|
||||
|
Loading…
x
Reference in New Issue
Block a user