-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Strip i386 arch from tvOS compiler-rt lib (if present) #38262
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
Strip i386 arch from tvOS compiler-rt lib (if present) #38262
Conversation
This is to avoid the following issue when generating toolchains for macOS ``` ld: building for tvOS, but linking in object file built for tvOS Simulator, file '/tmp/strip.mgCPcB' for architecture i386 fatal error: /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/strip: internal link edit command failed ``` This reverts commit 8470faf, swiftlang#37929 Addresses rdar://80098850
@swift-ci please smoke test |
@swift-ci please build toolchain |
From my understanding, this will not work with Xcode 13 beta. We currently have Xcode 13 beta on macOS toolchain bot and Xcode 12.3 on all other bots. |
If you don't mind, can you verify this change on both Xcode 12.3 and Xcode 13 beta 1? |
Linux Toolchain (Ubuntu 16.04) Install command |
@swift-ci please smoke test |
@swift-ci please build toolchain |
Doing a clean build locally with Xcode 13.0 beta 1 indeed exposed an issue around the copy of the libraries when the source library does not have the i386 slice to begin with. I am still running the preset locally to ensure the change is sane, I will lean on CI to ensure the change still works with Xcode 12.3 |
Linux Toolchain (Ubuntu 16.04) Install command |
macOS Toolchain Install command |
@edymtt Can you also cherry-pick this on to 5.5 branch? |
The previous logic could fail silently to copy the library if the i386 slice is not present in the first place (like it is the case for `libclang_rt.tvos.a` in Xcode 13.0 beta 1) -- this will avoid errors like ``` Undefined symbols for architecture arm64: "___isPlatformVersionAtLeast", referenced from: swift::initializeProtocolLookup() in ImageInspectionMachO.cpp.o swift::initializeProtocolConformanceLookup() in ImageInspectionMachO.cpp.o swift::initializeTypeMetadataRecordLookup() in ImageInspectionMachO.cpp.o swift::initializeDynamicReplacementLookup() in ImageInspectionMachO.cpp.o ``` This is a backport of swiftlang#38262 Addresses rdar://80209915
Sure -- created #38275 |
This is to avoid the following issue when generating toolchains for
macOS
This reverts commit 8470faf, #37929
Addresses rdar://80098850