Skip to content

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