Skip to content

Allow bootstrap to work when building a toolchain on Apple Silicon #5754

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
Sep 2, 2022

Conversation

edymtt
Copy link
Contributor

@edymtt edymtt commented Sep 1, 2022

Allow bootstrap to work when building a toolchain on Apple Silicon

Motivation:

We are ironing out the current issues we are having when building a toolchain on Apple Silicon, and currently we are hitting the following exception when bootstrap starts (rdar://99040114)

Traceback (most recent call last):
  File "/Volumes/Storage/swift_public/swift-arm64/swiftpm/Utilities/bootstrap", line 825, in <module>
    main()
  File "/Volumes/Storage/swift_public/swift-arm64/swiftpm/Utilities/bootstrap", line 65, in main
    args.func(args)
  File "/Volumes/Storage/swift_public/swift-arm64/swiftpm/Utilities/bootstrap", line 329, in build
    parse_build_args(args)
  File "/Volumes/Storage/swift_public/swift-arm64/swiftpm/Utilities/bootstrap", line 225, in parse_build_args
    args.bootstrap_dir = os.path.join(args.target_dir, "bootstrap")
AttributeError: 'Namespace' object has no attribute 'target_dir'

Modifications:

Generalization of a check in bootstrap

Result:

We should be able to start the CMake builds for swiftpm

@edymtt
Copy link
Contributor Author

edymtt commented Sep 1, 2022

@swift-ci please test

@neonichu
Copy link
Contributor

neonichu commented Sep 1, 2022

Looks fine. I wouldn't be surprised if we encounter more follow-on issues, the cross-compilation support of bootstrap is really minimal.

@edymtt
Copy link
Contributor Author

edymtt commented Sep 2, 2022

@swift-ci please smoke test

@edymtt edymtt merged commit 5b88aef into swiftlang:main Sep 2, 2022
@edymtt edymtt deleted the allow-to-start-bootstrap-on-asi branch September 2, 2022 11:33
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.

2 participants