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

Exclude unnecessary info from CodegenResults #80187

Merged
merged 2 commits into from
Dec 25, 2020
Merged

Exclude unnecessary info from CodegenResults #80187

merged 2 commits into from
Dec 25, 2020

Conversation

0dvictor
Copy link
Contributor

@0dvictor 0dvictor commented Dec 19, 2020

foreign_module and wasm_import_module are not needed for linking, and hence can be removed from CodegenResults.

Fixes #77857

@rust-highfive
Copy link
Collaborator

r? @lcnr

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Dec 19, 2020
@0dvictor
Copy link
Contributor Author

@bjorn3 Could you take a look?

@0dvictor 0dvictor mentioned this pull request Dec 19, 2020
@bjorn3
Copy link
Member

bjorn3 commented Dec 19, 2020

Can you please add a test for -Zno-link?

@0dvictor
Copy link
Contributor Author

Good idea, let me look into it.

@lcnr
Copy link
Contributor

lcnr commented Dec 19, 2020

r? @bjorn3 i think

@rust-highfive rust-highfive assigned bjorn3 and unassigned lcnr Dec 19, 2020

impl From<&cstore::NativeLib> for NativeLib {
fn from(lib: &cstore::NativeLib) -> Self {
NativeLib { kind: lib.kind.clone(), name: lib.name.clone(), cfg: lib.cfg.clone() }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Must we do a clone here?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The cstore::NativeLib originates from an Lrc, so we can't move any of these fields.

Victor Ding added 2 commits December 23, 2020 12:51
`foreign_module` and `wasm_import_module` are not needed for linking,
and hence can be removed from CodegenResults.
@0dvictor
Copy link
Contributor Author

Added a sanity test covering -Z no-link and -Z link-only.

@bjorn3
Copy link
Member

bjorn3 commented Dec 23, 2020

Thanks!

@bors r+

@bors
Copy link
Contributor

bors commented Dec 23, 2020

📌 Commit e8a564e has been approved by bjorn3

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Dec 23, 2020
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request Dec 23, 2020
Exclude unnecessary info from CodegenResults

`foreign_module` and `wasm_import_module` are not needed for linking, and hence can be removed from CodegenResults.

Fixes rust-lang#77857
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request Dec 24, 2020
Exclude unnecessary info from CodegenResults

`foreign_module` and `wasm_import_module` are not needed for linking, and hence can be removed from CodegenResults.

Fixes rust-lang#77857
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request Dec 24, 2020
Exclude unnecessary info from CodegenResults

`foreign_module` and `wasm_import_module` are not needed for linking, and hence can be removed from CodegenResults.

Fixes rust-lang#77857
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request Dec 24, 2020
Exclude unnecessary info from CodegenResults

`foreign_module` and `wasm_import_module` are not needed for linking, and hence can be removed from CodegenResults.

Fixes rust-lang#77857
@bors
Copy link
Contributor

bors commented Dec 25, 2020

⌛ Testing commit e8a564e with merge 198ec34...

@bors
Copy link
Contributor

bors commented Dec 25, 2020

☀️ Test successful - checks-actions
Approved by: bjorn3
Pushing 198ec34 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Dec 25, 2020
@bors bors merged commit 198ec34 into rust-lang:master Dec 25, 2020
@rustbot rustbot added this to the 1.50.0 milestone Dec 25, 2020
@0dvictor 0dvictor deleted the nativelib branch January 8, 2021 03:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

-Zno-link is broken
7 participants