add tests which assert that import list for simple executable not changed silently by klensy · Pull Request #121494 · rust-lang/rust (original) (raw)

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 andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters

[ Show hidden characters]({{ revealButtonHref }})

klensy

added tests for x86_64-pc-windows-msvc and x86_64-unknown-linux-gnu

@rustbot

r? @Mark-Simulacrum

rustbot has assigned @Mark-Simulacrum.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rust-log-analyzer

This comment has been minimized.

@klensy

@ChrisDenton

Is there are reason this in particular is useful? I would expect this to change as the C runtime changes between versions. And also a fair bit on the Rust side over time, especially around now as we're moving to a Windows 10 baseline.

@klensy

Yes, but runtime changes not every day, same is true for transition to Windows 10 baseline (windows dependency list should be quite stable, but don't know about linux ones).

Plus this is additional guard against issues like #85441, #108714 (comment)

@klensy

I'll probably add more variations to tests, like lto and stuff, they cut import list quite nice ,for example for x86_64-pc-windows-gnu

@klensy

bjorn3

@Dylan-DPC

@klensy any updates on this? thanks

@ChrisDenton

While I remain nervous about this (e.g. the CRT could add or remove DLLs) I am broadly in favour.

Maybe with the modern rust run-make tests we could use the object crate to gather imports? And, for Windows, compare with a list of known functions for Windows 1507? That would seem more robust than having to add or remove imports if something changes.

Labels

S-waiting-on-author

Status: This is awaiting some action (such as code changes or more information) from the author.