-
-
Notifications
You must be signed in to change notification settings - Fork 196
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
Fix make build_release
after changes to lib_internalSwiftSyntaxParser
#493
Fix make build_release
after changes to lib_internalSwiftSyntaxParser
#493
Conversation
…ng library dependencies and duplicate symbols
show_bin_path: | ||
@echo ${BIN_PATH} | ||
@echo ${EXECUTABLE} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's probably worth confirming the exact purpose of make show_bin_path
now, since we have to manually create the universal binary, the output path (.build/periphery
) is always known anyway.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's used in the release script. Probably not quite as useful now, but still, it's nice to keep the logic in here.
The other thing I wanted to confirm... Was But then again, I didn't think universal binaries were a thing on Linux which leads me to think that |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The other thing I wanted to confirm... Was make build_release ever used on Linux?
Nope, just macOS.
show_bin_path: | ||
@echo ${BIN_PATH} | ||
@echo ${EXECUTABLE} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's used in the release script. Probably not quite as useful now, but still, it's nice to keep the logic in here.
Thank you once again for all your hard work, @liamnichols. I really appreciate it 🙇 |
Background
After switching to using StaticInternalSwiftSyntax parser on macOS, we become impacted by a bug when trying to build a fat binary:
The problem comes when trying to use
swift build --arch arm64 --arch x86_64
however I originally didn't think that we were doing this and forgot to check the Makefile. After seeing the issue reported in swiftlang/swift#490, I realised that we do need to work around this.Changes
In this change, I follow the workaround that is used both in SwiftLint and Sourcery, which avoid the bug by building the arm64 and x86_64 binaries separately and then using
otool
to merge them together into one universal binary.