-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[Frontend] Re-enable ASAN builds support in load-pass-plugin
test (NFC)
#77870
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
[Frontend] Re-enable ASAN builds support in load-pass-plugin
test (NFC)
#77870
Conversation
cc/ @al45tair |
@swift-ci Please test |
Ugh, I couldn't reproduce the failure locally. I'm taking a better look. |
fe8475b
to
f6a62fb
Compare
Okay, the plugin is being built via clang so dynamic_lookup is not an option. I think using -bundle_loader is the correct option for the purpose of the test. May we test this again please? |
@swift-ci Please test |
…NFC) `libTestPlugin.dylib` dynamic library was previously linking against `libLLVMSupport.a`, which is already linked into the Swift compiler binary. This caused multiple conflicting definitions of `LLVMSupport` lib symbols, leading to ODR violations. This issue has been addressed by linking against `libLLVMSupport` via `-hidden-lLLVMSupport` flag, ensuring `libLLVMSupport` symbols remain hidden within the plugin, preventing conflicts with those in the Swift compiler. Fixes: swiftlang#77771.
f6a62fb
to
d30af4c
Compare
@al45tair Sorry, was not reproducing this correctly. Even though the Swift compiler already links against libLLVMSupport, the symbol __ZN4llvm23EnableABIBreakingChecksE doesn't appear to be there, so -bundle_loader doesn't work either. For the purpose of the test, I suggest keep linking against libLLVMSupport, yet ensuring symbols remain private within the plugin, thus avoiding possible conflicting definitions. Tested this both with |
@swift-ci Please test |
Should be on track? |
LGTM. Can't merge right now because the branches are locked, but we should take this. Thank-you :-) |
Looks like auto-merging did not trigger? |
libTestPlugin.dylib
dynamic library was previously linking againstlibLLVMSupport.a
, whose library is already linked in the Swift compiler binary, hence leading to multiple conflicting definitions oflibLLVMSupport
symbols. This issue has been addressed by telling the linker to resolve undefined symbols from the Swift frontend at runtime.Fixes: #77771.