Skip to content

Small fixes for --crate-type staticlib #106224

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

Merged
merged 3 commits into from
Jan 5, 2023
Merged

Conversation

bjorn3
Copy link
Member

@bjorn3 bjorn3 commented Dec 28, 2022

The first commit doesn't have an effect until we start translating error messages. The second commit fixes potential linker errors when combining --crate-type staticlib with another crate type and I think -Cprefer-dynamic.

This breaks tools that depend on the prefix
Otherwise we may pick the dependency formats for say a dylib when
linking a staticlib.
@bjorn3 bjorn3 added A-linkage Area: linking into static, shared libraries and binaries T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Dec 28, 2022
@rustbot
Copy link
Collaborator

rustbot commented Dec 28, 2022

r? @wesleywiser

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

@rustbot rustbot added A-translation Area: Translation infrastructure, and migrating existing diagnostics to SessionDiagnostic S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Dec 28, 2022
@rustbot
Copy link
Collaborator

rustbot commented Dec 28, 2022

rustc_error_messages was changed

cc @davidtwco, @compiler-errors, @JohnTitor, @estebank, @TaKO8Ki

@wesleywiser
Copy link
Member

Thanks @bjorn3!

@bors r+

@bors
Copy link
Collaborator

bors commented Jan 3, 2023

📌 Commit ed77a61 has been approved by wesleywiser

It is now in the queue for this repository.

@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 Jan 3, 2023
@bors
Copy link
Collaborator

bors commented Jan 4, 2023

⌛ Testing commit ed77a61 with merge aaeecca1456e1f5d90a3f5e2cb56686816f3a287...

@bors
Copy link
Collaborator

bors commented Jan 4, 2023

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jan 4, 2023
@rust-log-analyzer

This comment has been minimized.

@bjorn3
Copy link
Member Author

bjorn3 commented Jan 4, 2023

I didn't account for it being possible for a crate to have 0 crate types like would happen if you use --crate-type cdylib on a platform not supporting cdylib's.

@wesleywiser
Copy link
Member

@bors r+

@bors
Copy link
Collaborator

bors commented Jan 4, 2023

📌 Commit 7705116 has been approved by wesleywiser

It is now in the queue for this repository.

@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 Jan 4, 2023
@bors
Copy link
Collaborator

bors commented Jan 4, 2023

⌛ Testing commit 7705116 with merge d9e317a...

@bors
Copy link
Collaborator

bors commented Jan 5, 2023

☀️ Test successful - checks-actions
Approved by: wesleywiser
Pushing d9e317a to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jan 5, 2023
@bors bors merged commit d9e317a into rust-lang:master Jan 5, 2023
@rustbot rustbot added this to the 1.68.0 milestone Jan 5, 2023
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (d9e317a): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

This benchmark run did not return any relevant results for this metric.

Cycles

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
1.0% [1.0%, 1.1%] 2
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 1.0% [1.0%, 1.1%] 2

@bjorn3 bjorn3 deleted the staticlib_fixes branch January 5, 2023 08:17
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 A-translation Area: Translation infrastructure, and migrating existing diagnostics to SessionDiagnostic 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. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants