Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upCross-compile from Linux to macOS? #24740
Comments
Maybe it’s not too terrible. This was enough to successfully cross-compile the --- build.rs
+++ build.rs
@@ -12,6 +12,8 @@ fn main() {
cc::Build::new()
.file("libtinyfiledialogs/tinyfiledialogs.c")
.flag("-v")
+ .flag("-isysroot")
+ .flag("/home/simon/tmp/macos-sdk/MacOSX10.13.sdk")
.compile("libtinyfiledialogs.a");
if target.contains("windows") {Of course when doing this "for real" we’d make it conditional on But there’s significant of variety in build script in all of Servo’s recursive dependencies, many compile C or C++ code without the |
RustAudio/coreaudio-sys#28 does it for a smaller Rust project. This would likely involve non-trivial work in the
build.rsfile of each dependency that compiles non-Rust code.On CI we may want to keep some build tasks on macOS to check that they keep working, but switching at least the release build used for WPT to be compiled on Linux with many more CPU cores could help significantly reduce Homu’s cycle time.