Skip to content

Conversation

@edymtt
Copy link
Contributor

@edymtt edymtt commented Sep 2, 2022

...so that the build with swiftpm can start.

This will allow to build a Swift toolchain on Apple Silicon

Addresses rdar://99484030

Motivation:

We are ironing out the current issues we are having when building a toolchain on Apple Silicon, and after #5754 we are now hitting

--- bootstrap: note: Building SwiftPM (with a freshly built swift-build)
--- bootstrap: error: cannot cross-compile for macosx-x86_64 

Modifications:

Amend a check so not to assume any particular architecture when assessing if we are cross compiling on Darwin.

Result:

We should be able to build swiftpm as part of a Swift toolchain on Apple Silicon

...so that the build with swiftpm can start.

This will allow to build a Swift toolchain on Apple Silicon

Addresses rdar://99484030
@edymtt
Copy link
Contributor Author

edymtt commented Sep 2, 2022

@swift-ci please smoke test

@neonichu
Copy link
Contributor

neonichu commented Sep 2, 2022

I think we need to keep checking build_target as well since the following code will only work on a macOS host.

@edymtt
Copy link
Contributor Author

edymtt commented Sep 5, 2022

@swift-ci please smoke test

@azarovalex
Copy link

We definitely need this fix to build the toolchain on M1, I ended up with the same fix locally.
Actually @johnno1962 tried to merge it a year ago: #3500 (comment)

It's good to see the fix finally landing.👍

@edymtt edymtt merged commit b87bd4f into swiftlang:main Sep 7, 2022
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.

5 participants