Skip to content
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

Make all linker warnings errors in CI #667

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tgross35
Copy link
Contributor

@tgross35 tgross35 commented Aug 11, 2024

Give us a better chance of detecting any kind of link issues or user-visible warnings in advance.

Inspired by #665 (comment)

@tgross35 tgross35 changed the title Make all linker warnings errors [experiment] Make all linker warnings errors Aug 12, 2024
@tgross35
Copy link
Contributor Author

Failure notes:

@ChrisDenton
Copy link
Member

For MSVC it's /WX

@tgross35
Copy link
Contributor Author

Does it ignore unrecognized link args? fatal-warnings is still getting passed and it doesn't seem to complain https://github.com/rust-lang/compiler-builtins/actions/runs/10343839608/job/28628523945?pr=667#step:11:23

@ChrisDenton
Copy link
Member

I mean... /Wx isn't being passed yet?

> rustc hello.rs -C link-args='/WX --fatal-warnings'

error: linking with `link.exe` failed: exit code: 4044
[...]
  = note: LINK : warning LNK4044: unrecognized option '/-fatal-warnings'; ignored
          LINK : error LNK1218: warning treated as error; no output file generated

@tgross35
Copy link
Contributor Author

Oh, unrecognized linker args are warnings by default rather than errors? I was just expecting it to complain like the other targets that don't support -Wl,--fatal-warnings do.

Give us a better chance of detecting any kind of link issues or
user-visible warnings in advance.
@tgross35 tgross35 changed the title [experiment] Make all linker warnings errors Make all linker warnings errors in CI Sep 28, 2024
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.

2 participants