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

--lib should produce reasonable output file names #744

Closed
msullivan opened this issue Jul 26, 2011 · 5 comments
Closed

--lib should produce reasonable output file names #744

msullivan opened this issue Jul 26, 2011 · 5 comments
Labels
A-linkage Area: linking into static, shared libraries and binaries E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.

Comments

@msullivan
Copy link
Contributor

Right now, if you do "rustc --lib foo.rc", it will produce a library named "foo". It should produce a library named "libfoo.so" on linux and the equivalents on other platforms.

@brson
Copy link
Contributor

brson commented Oct 26, 2011

The man page will need to be updated to reflect this fix.

lht added a commit to lht/rust that referenced this issue Oct 27, 2011
@lht
Copy link
Contributor

lht commented Oct 27, 2011

Only tested commit 06e5dad on Linux.

@brson
Copy link
Contributor

brson commented Oct 27, 2011

I think we should take a different approach here, and resist more doing more filename munging in link_binary.

In rustc::driver::rustc::main there's already a big hunk of code dedicated to figuring out the correct name of the output file, and we have a function in std::os called dylib_filename that builds correct library names for the host platform. For now I think the best thing to do is put another check in main that uses dylib_filename when the compiler is building a library and isn't given an output file.

Ultimately all that filename manipulation in main should probably be separated from the call to compile_input and extracted to its own function.

lht added a commit to lht/rust that referenced this issue Oct 28, 2011
@lht
Copy link
Contributor

lht commented Oct 28, 2011

Thanks Brian for the comments and suggestions!

In commit 6b9d4b6, I tried to build the file names in rustc::driver::rustc::main.

Based on which, another commit 03f93aa, tries to do the "ultimate" thing. Lifts file name manipulation out of main altogether.

(Sorry, still only tested on Linux x64).

brson pushed a commit that referenced this issue Oct 28, 2011
@brson
Copy link
Contributor

brson commented Oct 28, 2011

This looks great, lht. Our main function is finally down to an appropriate size. I've merged both commits. Thanks.

@brson brson closed this as completed Oct 28, 2011
keeperofdakeys pushed a commit to keeperofdakeys/rust that referenced this issue Dec 12, 2017
Updated types of PTRACE requests for musl to be consistent.

For some reason the type of ptrace request constants in musl change for the register based requests. As they are used in the same way and this doesn't mimic musl this has been changed for consistency and ease of use.

First raised in issue rust-lang#744
pdietl pushed a commit to pdietl/rust that referenced this issue Apr 23, 2020
bors pushed a commit to rust-lang-ci/rust that referenced this issue Oct 26, 2020
Bumps [miniz_oxide](https://github.com/Frommi/miniz_oxide) from 0.3.2 to 0.3.3.
- [Release notes](https://github.com/Frommi/miniz_oxide/releases)
- [Commits](https://github.com/Frommi/miniz_oxide/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
ZuseZ4 pushed a commit to EnzymeAD/rust that referenced this issue Mar 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-linkage Area: linking into static, shared libraries and binaries E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
Projects
None yet
Development

No branches or pull requests

3 participants