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

mk: Add -C metadata for compiling crates we ship #32560

Merged
merged 1 commit into from
Mar 28, 2016

Conversation

alexcrichton
Copy link
Member

This should re-enable all external builds of crates with the same name. Right
now Cargo doesn't pass -C metadata for the top-level library being compiled,
so if that library is called libc, for example, then it won't be able to link
to the standard library which also has a libc library compiled without -C metadata. This can result in naming conflicts which need to be resolved.

By passing -C metadata to the in-tree crates we ship it should add some extra
salt to all symbol names to ensure that they don't collide.

Closes #32532

This should re-enable all external builds of crates with the same name. Right
now Cargo doesn't pass `-C metadata` for the top-level library being compiled,
so if that library is called `libc`, for example, then it won't be able to link
to the standard library which *also* has a `libc` library compiled without `-C
metadata`. This can result in naming conflicts which need to be resolved.

By passing `-C metadata` to the in-tree crates we ship it should add some extra
salt to all symbol names to ensure that they don't collide.
@rust-highfive
Copy link
Collaborator

r? @aturon

(rust_highfive has picked a reviewer for you, use r? to override)

@nikomatsakis
Copy link
Contributor

cc @michaelwoerister

@nikomatsakis
Copy link
Contributor

@bors r+ p=1

@bors
Copy link
Contributor

bors commented Mar 28, 2016

📌 Commit 6908e4e has been approved by nikomatsakis

@nikomatsakis nikomatsakis assigned nikomatsakis and unassigned aturon Mar 28, 2016
@alexcrichton
Copy link
Member Author

I suspect that this will not fix #32532, unfortunately

@nikomatsakis
Copy link
Contributor

@alexcrichton I think @michaelwoerister thought that it likely would, but I guess we'll find out. (We'll obviously need a new nightly.)

@alexcrichton
Copy link
Member Author

Thinking for a few seconds on this as well, I believe you are right!

The bug there was that the in-tree libc had blank metadata, and then when we generate documentation out of tree it also has blank metadata (as Cargo doesn't pass -C metadata). This means the in-tree copy will always have metadata that external Cargo won't mirror, so should be good to go.

@bors
Copy link
Contributor

bors commented Mar 28, 2016

⌛ Testing commit 6908e4e with merge 1f131fb...

bors added a commit that referenced this pull request Mar 28, 2016
…tsakis

mk: Add `-C metadata` for compiling crates we ship

This should re-enable all external builds of crates with the same name. Right
now Cargo doesn't pass `-C metadata` for the top-level library being compiled,
so if that library is called `libc`, for example, then it won't be able to link
to the standard library which *also* has a `libc` library compiled without `-C
metadata`. This can result in naming conflicts which need to be resolved.

By passing `-C metadata` to the in-tree crates we ship it should add some extra
salt to all symbol names to ensure that they don't collide.

Closes #32532
@michaelwoerister
Copy link
Member

@alexcrichton You've made exactly the same changes that I already had locally :)

I had some symbol conflicts when running make check on this with -Ccodegen-units=4 but I think it's not related to these changes. I'll investigate further and open an issue when I know more.

@alexcrichton
Copy link
Member Author

Ah ok, thanks @michaelwoerister!

@bors bors merged commit 6908e4e into rust-lang:master Mar 28, 2016
@nikomatsakis
Copy link
Contributor

@michaelwoerister that is probably #32518

On Mon, Mar 28, 2016 at 3:52 PM, bors notifications@github.com wrote:

Merged #32560 #32560.


You are receiving this because you were assigned.
Reply to this email directly or view it on GitHub
#32560 (comment)

@michaelwoerister
Copy link
Member

@nikomatsakis Yes, that seems to be it. And @dotdash's fix in #32557 is also what I had in mind.

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.

Rustdoc fails with info about symbol names
6 participants