Skip to content

build: support CMAKE_SWIFT_COMPILER_TARGET #509

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 31, 2019

Conversation

compnerd
Copy link
Member

This adds support for a new variable CMAKE_SWIFT_COMPILER_TARGET which
mirror's CMake's CMAKE_Swift_COMPILER_TARGET.

This adds support for a new variable `CMAKE_SWIFT_COMPILER_TARGET` which
mirror's CMake's `CMAKE_Swift_COMPILER_TARGET`.
@ephemer
Copy link
Contributor

ephemer commented Jul 23, 2019

I'm a bit hazy on CMake's case sensitivity (which has been an issue for the Android build in this repo before)- is there are reason to spell this differently compared to what CMake expects internally?

@compnerd
Copy link
Member Author

Yes, it is “misspelt” because right now all the builds use the old spelling of CMAKE_SWIFT_COMPILER.

@ephemer
Copy link
Contributor

ephemer commented Jul 24, 2019

@compnerd maybe we should add a step that sets CMAKE_SWIFT_COMPILER_TARGET if (only) CMAKE_C_COMPILER_TARGET has been set to avoid breaking everyone's builds

@compnerd
Copy link
Member Author

Well, the use of CMAKE_SWIFT_COMPILER_TARGET is only useful when doing a cross-compile, most people aren’t doing that, so I don’t really think that this would break most people’s build.

@ktopley-apple
Copy link
Contributor

@swift-ci please test

@ktopley-apple ktopley-apple merged commit 68875cb into swiftlang:master Jul 31, 2019
@vgorloff
Copy link
Contributor

vgorloff commented Aug 4, 2019

FYI: Possible values for CMAKE_SWIFT_COMPILER_TARGET for Android cross-compile builds:

-DCMAKE_SWIFT_COMPILER_TARGET=armv7-none-linux-androideabi
-DCMAKE_SWIFT_COMPILER_TARGET=aarch64-none-linux-android
-DCMAKE_SWIFT_COMPILER_TARGET=i686-none-linux-android
-DCMAKE_SWIFT_COMPILER_TARGET=x86_64-none-linux-android

@compnerd compnerd deleted the compiler-target branch February 15, 2020 19:39
rokhinip pushed a commit that referenced this pull request Nov 5, 2021
build: support `CMAKE_SWIFT_COMPILER_TARGET`
Signed-off-by: Kim Topley <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants