-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Add llvm-nm to list of LLVM tools built with stdlib standalone mode #33681
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 please test |
Please restrict this behaviour to standalone builds (on Darwin). Im worried that this is going to complicate the tests as this restricts the ability to get fixes into llvm-nm (via libObject or other changes). |
@swift-ci test stdlib with toolchain |
My main concern is if llvm-nm has a feature that we rely on. I would go the other way and make it so that standalone only uses llvm-nm and that we add a lit feature of some sort that says that one should assume no llvm-tools. Need to think about it more. |
By the way the Xcode supplied “nm” actually is llvm-nm. That’s why I’m suggesting this change. |
Yes, but it might be old and incompatible though. We have hit this in the past with other tools. |
Any other preferred solution? The others I can think of:
Practically, though, I would bet that for the purposes that the two tests are using llvm-nm today (listing weak symbols), the Darwin OS version of "nm" is going to be pretty stable and reliable (unless you have an Xcode that's many years old, which actually won't be able to build recent Swift anyway.) |
@swift-ci please test |
Build failed |
Build failed |
I think I prefer 3 and then 1. Not all platforms have nm, and allowing as many tests to be portable is preferable so that people testing on other platforms don't break. That said, the build already requires clang at certain points, so the LLVM dependency is there. So seems that expecting llvm-nm isn't entirely unreasonable. |
How about introducing a new python script that would have a more specific function: List all weak symbols from a target binary, or list all exported symbols from the binary. On Darwin, we'd use "nm" for this, on Linux, "objdump". I really don't see the need for llvm-nm (and to pay the cost of building it) if all we need is list of exports and weak symbols. We could then use it like this: |
What about windows? What about building with MSVC vs clang? I think that using |
Maybe I misread what you mentioned before. Do you actually want to include |
02d6eee
to
3f32475
Compare
@swift-ci test stdlib with toolchain |
@swift-ci please test stdlib with toolchain |
@swift-ci please test |
Build failed |
Build failed |
@swift-ci please test |
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.
LGTM
Sorry, yes, I think it is better to include |
This is to fix the two test failures from https://ci.swift.org/job/swift-PR-stdlib-with-toolchain-osx/7/console.