Skip to content

Replace the nm symbol check with a Rust implementation #828

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

tgross35
Copy link
Contributor

@tgross35 tgross35 commented Apr 19, 2025

This should be less error-prone and adaptable than the nm version, and
have better cross-platform support without needing LLVM nm installed.

@tgross35
Copy link
Contributor Author

I should have the rust script invoke cargo as well; run the script with Cargo args, the script invokes Cargo and passes --message-format=json which includes the output file name, and scan them. This avoids any problems from scanning the wrong files.

@tgross35 tgross35 force-pushed the symbol-check branch 3 times, most recently from 43c57a7 to c59ec4e Compare May 28, 2025 20:31
tgross35 added 3 commits May 28, 2025 20:48
These are now provided by `compiler-builtins`, so there is no need to
also build the C versions. This was detected by checking for duplicate
symbols and not excluding weak symbols (like CI currently does).
This should be less error-prone and adaptable than the `nm` version, and
have better cross-platform support without needing LLVM `nm` installed.
Since a working `nm` is no longer needed as part of CI, the rustup
component can be removed.
@tgross35 tgross35 marked this pull request as ready for review May 28, 2025 20:58
@tgross35
Copy link
Contributor Author

@beetrees I think you mentioned doing something like this a long time ago - would you mind taking a look at this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant