Skip to content

Warn if building a library with explicit output file name #2401

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

Closed
catamorphism opened this issue May 17, 2012 · 1 comment
Closed

Warn if building a library with explicit output file name #2401

catamorphism opened this issue May 17, 2012 · 1 comment
Labels
A-driver Area: rustc_driver that ties everything together into the `rustc` compiler

Comments

@catamorphism
Copy link
Contributor

Warn if rustc is building a library and the command-line also contained a -o flag, since the library file name will be the same regardless. (See a FIXME in driver::driver::build_output_filenames.)

@bstrie
Copy link
Contributor

bstrie commented Apr 26, 2013

This:

$ rustc --lib lauxlibh_lua52.rs
warning: missing crate link meta `name`, using `lauxlibh_lua52` as default
warning: missing crate link meta `vers`, using `0.0` as default

produces liblauxlibh_lua52-68a2c114141ca-0.0.so, while this:

$ rustc --lib -o asdf.so lauxlibh_lua52.rs
warning: missing crate link meta `name`, using `asdf` as default
warning: missing crate link meta `vers`, using `0.0` as default

produces libasdf-68a2c114141ca-0.0.so.

So it appears that -o now affects the name of the output lib.

@bstrie bstrie closed this as completed Apr 26, 2013
bors added a commit to rust-lang-ci/rust that referenced this issue Sep 22, 2022
fix test file name

Would be better to run this test when doing `./miri test dyn`.
celinval pushed a commit to celinval/rust-dev that referenced this issue Jun 4, 2024
This ensures that users can copy-and-paste the benchcomp results and investigate them locally.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-driver Area: rustc_driver that ties everything together into the `rustc` compiler
Projects
None yet
Development

No branches or pull requests

2 participants