Improve cross compiling support#158
Improve cross compiling support#158thomcc merged 3 commits intorust-lang:masterfrom messense:cross-compile
Conversation
| } | ||
| } else if target.contains("solaris") { | ||
| if !self.defined("CMAKE_SYSTEM_NAME") { | ||
| self.define("CMAKE_SYSTEM_NAME", "SunOS"); |
thomcc
left a comment
There was a problem hiding this comment.
This looks great. Thanks for improving the CI too.
…Fixes rust-lang#173 In rust-lang#158, better support for using CMake's cross-compilation facilities was added. This made the workaround added in rust-lang#110 for iOS not only unnecessary, but actively harmful, in that it runs afoul of SDK validation checks in the CMake iOS codepath.
* add an iOS cross-compile test to CI * Fix zlib-ng compilation for iOS * Revert #110 to fix iOS cross-compilation after #158. Fixes #173 In #158, better support for using CMake's cross-compilation facilities was added. This made the workaround added in #110 for iOS not only unnecessary, but actively harmful, in that it runs afoul of SDK validation checks in the CMake iOS codepath. * Use checkout@v3 Co-authored-by: Yuki Okushi <[email protected]> --------- Co-authored-by: Thom Chiovoloni <[email protected]> Co-authored-by: Yuki Okushi <[email protected]>
|
I'm afraid this broke no-toolchain cross-compilation using Visual Studio, from an x86_64 Windows host to aarch64-pc-windows-msvc. Things are a bit clunky there in general (the existing support goes through platforms and does not set (Specifically, the auto-search for |
|
Workaround: set |
|
Turns out this also broke cross-compiling to Mac Catalyst targets ( EDIT (months later): here's CMake not deciding what to do about Catalyst, which isn't cmake-rs's fault. |
To avoid a panic in cmake-rs that was introduced in: rust-lang/cmake-rs#158
To avoid a panic in cmake-rs that was introduced in: rust-lang/cmake-rs#158
To avoid a panic in cmake-rs that was introduced in: rust-lang/cmake-rs#158
To avoid a panic in cmake-rs that was introduced in: rust-lang/cmake-rs#158
To avoid a panic in cmake-rs that was introduced in: rust-lang/cmake-rs#158
Drop patch to exclusively disable it in code It seems to be fixed upstream [1] [1] rust-lang/cmake-rs#158 Signed-off-by: Khem Raj <[email protected]>
Drop patch to exclusively disable it in code It seems to be fixed upstream [1] [1] rust-lang/cmake-rs#158 (From OE-Core rev: 22b28d3d6a04a18194a9aada6a522bd1cbe70f0f) Signed-off-by: Khem Raj <[email protected]> Signed-off-by: Mathieu Dubois-Briand <[email protected]>
Drop patch to exclusively disable it in code It seems to be fixed upstream [1] [1] rust-lang/cmake-rs#158 Signed-off-by: Khem Raj <[email protected]>
Drop patch to exclusively disable it in code It seems to be fixed upstream [1] [1] rust-lang/cmake-rs#158 Signed-off-by: Khem Raj <[email protected]>
Drop patch to exclusively disable it in code It seems to be fixed upstream [1] [1] rust-lang/cmake-rs#158 (From OE-Core rev: 9ea58340da8e1236ebc1011c2e9495bdc7669583) Signed-off-by: Khem Raj <[email protected]> Signed-off-by: Mathieu Dubois-Briand <[email protected]>
Drop patch to exclusively disable it in code It seems to be fixed upstream [1] [1] rust-lang/cmake-rs#158 Signed-off-by: Khem Raj <[email protected]>
Drop patch to exclusively disable it in code It seems to be fixed upstream [1] [1] rust-lang/cmake-rs#158 Signed-off-by: Khem Raj <[email protected]>
Drop patch to exclusively disable it in code It seems to be fixed upstream [1] [1] rust-lang/cmake-rs#158 Signed-off-by: Khem Raj <[email protected]>
Drop patch to exclusively disable it in code It seems to be fixed upstream [1] [1] rust-lang/cmake-rs#158 (From OE-Core rev: 9ea58340da8e1236ebc1011c2e9495bdc7669583) Signed-off-by: Khem Raj <[email protected]> Signed-off-by: Mathieu Dubois-Briand <[email protected]>
Drop patch to exclusively disable it in code It seems to be fixed upstream [1] [1] rust-lang/cmake-rs#158 (From OE-Core rev: 9ea58340da8e1236ebc1011c2e9495bdc7669583) Signed-off-by: Khem Raj <[email protected]> Signed-off-by: Mathieu Dubois-Briand <[email protected]>
Drop patch to exclusively disable it in code It seems to be fixed upstream [1] [1] rust-lang/cmake-rs#158 Signed-off-by: Khem Raj <[email protected]>
Drop patch to exclusively disable it in code It seems to be fixed upstream [1] [1] rust-lang/cmake-rs#158 Signed-off-by: Khem Raj <[email protected]>
Drop patch to exclusively disable it in code It seems to be fixed upstream [1] [1] rust-lang/cmake-rs#158 (From OE-Core rev: 9ea58340da8e1236ebc1011c2e9495bdc7669583) Signed-off-by: Khem Raj <[email protected]> Signed-off-by: Mathieu Dubois-Briand <[email protected]>
Drop patch to exclusively disable it in code It seems to be fixed upstream [1] [1] rust-lang/cmake-rs#158 (From OE-Core rev: d1e7af5bc3d9349f5266e8bca68aedd19cc83e4b) Signed-off-by: Khem Raj <[email protected]> Signed-off-by: Mathieu Dubois-Briand <[email protected]>
Drop patch to exclusively disable it in code It seems to be fixed upstream [1] [1] rust-lang/cmake-rs#158 (From OE-Core rev: d1e7af5bc3d9349f5266e8bca68aedd19cc83e4b) Signed-off-by: Khem Raj <[email protected]> Signed-off-by: Mathieu Dubois-Briand <[email protected]>
Drop patch to exclusively disable it in code It seems to be fixed upstream [1] [1] rust-lang/cmake-rs#158 (From OE-Core rev: d1e7af5bc3d9349f5266e8bca68aedd19cc83e4b) Signed-off-by: Khem Raj <[email protected]> Signed-off-by: Mathieu Dubois-Briand <[email protected]>
Drop patch to exclusively disable it in code It seems to be fixed upstream [1] [1] rust-lang/cmake-rs#158 (From OE-Core rev: 48b012e0aeb5d92b934bb16465ba29c9cc6a667b) Signed-off-by: Khem Raj <[email protected]> Signed-off-by: Mathieu Dubois-Briand <[email protected]> Signed-off-by: Richard Purdie <[email protected]>
Drop patch to exclusively disable it in code It seems to be fixed upstream [1] [1] rust-lang/cmake-rs#158 Signed-off-by: Khem Raj <[email protected]> Signed-off-by: Mathieu Dubois-Briand <[email protected]> Signed-off-by: Richard Purdie <[email protected]>
Drop patch to exclusively disable it in code It seems to be fixed upstream [1] [1] rust-lang/cmake-rs#158 (From OE-Core rev: 8f4c2346fe91d5c34cb10ba582a5735e0611fada) Signed-off-by: Khem Raj <[email protected]> Signed-off-by: Mathieu Dubois-Briand <[email protected]>
Drop patch to exclusively disable it in code It seems to be fixed upstream [1] [1] rust-lang/cmake-rs#158 (From OE-Core rev: 8f4c2346fe91d5c34cb10ba582a5735e0611fada) Signed-off-by: Khem Raj <[email protected]> Signed-off-by: Mathieu Dubois-Briand <[email protected]>
Drop patch to exclusively disable it in code It seems to be fixed upstream [1] [1] rust-lang/cmake-rs#158 (From OE-Core rev: 51e9f95fe847b19abba2fd62e7c632865592a5be) Signed-off-by: Khem Raj <[email protected]> Signed-off-by: Mathieu Dubois-Briand <[email protected]>
Drop patch to exclusively disable it in code It seems to be fixed upstream [1] [1] rust-lang/cmake-rs#158 (From OE-Core rev: 60b4b0808a3b961917ed8abe16b9f7df2a311952) Signed-off-by: Khem Raj <[email protected]> Signed-off-by: Mathieu Dubois-Briand <[email protected]> Signed-off-by: Richard Purdie <[email protected]>
Drop patch to exclusively disable it in code It seems to be fixed upstream [1] [1] rust-lang/cmake-rs#158 Signed-off-by: Khem Raj <[email protected]> Signed-off-by: Mathieu Dubois-Briand <[email protected]> Signed-off-by: Richard Purdie <[email protected]>
Drop patch to exclusively disable it in code It seems to be fixed upstream [1] [1] rust-lang/cmake-rs#158 (From OE-Core rev: 60b4b0808a3b961917ed8abe16b9f7df2a311952) Signed-off-by: Khem Raj <[email protected]> Signed-off-by: Mathieu Dubois-Briand <[email protected]> Signed-off-by: Richard Purdie <[email protected]>
Drop patch to exclusively disable it in code It seems to be fixed upstream [1] [1] rust-lang/cmake-rs#158 (From OE-Core rev: 60b4b0808a3b961917ed8abe16b9f7df2a311952) Signed-off-by: Khem Raj <[email protected]> Signed-off-by: Mathieu Dubois-Briand <[email protected]> Signed-off-by: Richard Purdie <[email protected]> Signed-off-by: Mathieu Dubois-Briand <[email protected]>
Drop patch to exclusively disable it in code It seems to be fixed upstream [1] [1] rust-lang/cmake-rs#158 Signed-off-by: Khem Raj <[email protected]> Signed-off-by: Mathieu Dubois-Briand <[email protected]> Signed-off-by: Richard Purdie <[email protected]> (adapted from oe-core commit 60b4b0808a3b961917ed8abe16b9f7df2a311952) Signed-off-by: Scott Murray <[email protected]>
Drop patch to exclusively disable it in code It seems to be fixed upstream [1] [1] rust-lang/cmake-rs#158 Signed-off-by: Khem Raj <[email protected]> Signed-off-by: Mathieu Dubois-Briand <[email protected]> Signed-off-by: Richard Purdie <[email protected]> (adapted from oe-core commit 60b4b0808a3b961917ed8abe16b9f7df2a311952) Signed-off-by: Scott Murray <[email protected]>
Drop patch to exclusively disable it in code It seems to be fixed upstream [1] [1] rust-lang/cmake-rs#158 (From OE-Core rev: 60b4b0808a3b961917ed8abe16b9f7df2a311952) Change-Id: I92f1bd2d13a375adfa6154f7ad606aa9f4a115f5 Signed-off-by: Khem Raj <[email protected]> Signed-off-by: Mathieu Dubois-Briand <[email protected]> Signed-off-by: Richard Purdie <[email protected]> Signed-off-by: Andrew Geissler <[email protected]>
This PR changes
cmake-rsto fill outCMAKE_SYSTEM_NAMEandCMAKE_SYSTEM_PROCESSORbasedCARGO_CFG_TARGET_OSandCARGO_CFG_TARGET_ARCHwhen cross compiling whileCMAKE_TOOLCHAIN_FILEandCMAKE_SYSTEM_NAMEisn't set by user.It's tested on CI using
cross.Closes #75
Closes #80
Closes #151