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

crate_type = "lib" means a dynamic lib #11253

Closed
pcwalton opened this issue Jan 1, 2014 · 7 comments · Fixed by #11706
Closed

crate_type = "lib" means a dynamic lib #11253

pcwalton opened this issue Jan 1, 2014 · 7 comments · Fixed by #11706
Labels
A-linkage Area: linking into static, shared libraries and binaries P-medium Medium priority
Milestone

Comments

@pcwalton
Copy link
Contributor

pcwalton commented Jan 1, 2014

It should mean a static lib.

@metajack
Copy link
Contributor

metajack commented Jan 1, 2014

Should lib mean build both since it's unspecific?

@alexcrichton
Copy link
Member

I have defined this in the manual as the "compiler recommended" format of library. When I initially added rlibs, they weren't good enough to make the default. I believe that may have changed now, so perhaps it could become the default.

I'm a little wary of generating both formats, but it's an interesting idea and may actually be the best thing to do. Regardless, this warrants discussion.

@jhasse
Copy link
Contributor

jhasse commented Jan 6, 2014

+1 for creating a static lib (this means rlib, right?).

What would the use case be for creating both?

@jhasse
Copy link
Contributor

jhasse commented Jan 6, 2014

What should happen if crate_type isn't set?

I've implemented static lib as a default and it breaks a lot of tests ... :/

@alexcrichton
Copy link
Member

staticlib and rlib are two different outputs. The compiler will attempt to link rlibs together, and the compiler will never look at staticlibs (staticlibs are meant for integration with existing projects).

I do not believe the default should change until we have discussed this further.

@pnkfelix
Copy link
Member

pnkfelix commented Jan 9, 2014

Assigning to P-high. (I'm not 100% convinced that there isn't a backcompat risk; but that depends on how one defines the relationship between docs, users, and backcompat.)

@alexcrichton
Copy link
Member

We decided in today's meeting to continue making lib a platform-specific default. We also decided to make it rlib instead of dylib as it is today.

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 P-medium Medium priority
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants