-
Notifications
You must be signed in to change notification settings - Fork 81
Fix LD_EXPORT_GLOBAL_SYMBOLS when using swiftc as the linker driver #400
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
Conversation
@swift-ci test |
Gentle reminder that if this is meant to close #395, the PR description should say |
Condition = "$(LINKER_DRIVER) == swiftc"; | ||
CommandLineArgs = { | ||
YES = ( | ||
"-Xlinker", "--export-dynamic" |
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.
Why not use -Xclang-linker -rdynamic
instead?
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.
-rdynamic isn't available at all on Linux.
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 clang driver accepts -rdynamic everywhere. I generally agree we should be using -Xclang-linker in more places and delegate platform differences to the driver. Will put up a PR in a bit
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.
@dschaefer2 -rdynamic
is a platform agnostic spelling, can you help me understand why you believe it is unavailable on Linux?
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.
I get the following on Linux
warning: unknown Argument unused during compilation: '-rdynamic' [-Wunused-command-line-argument] []
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.
Yes, that is expected! during compilation is the operative portion of the message. This flag has no impact on compilation, it is a link time flag only. This is why -Xclang-linker
is used rather than -Xcc
. This flag is to be passed to the linker driver (clang
).
The question I had, is the behaviour -rdynamic provided not required on Linux? |
#395
Closes: #395