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

Enable new rlib in non stable cases #105601

Merged
merged 1 commit into from
Feb 12, 2023

Conversation

belovdv
Copy link
Contributor

@belovdv belovdv commented Dec 12, 2022

If bundled static library uses cfg (unstable) or whole-archive (wasn't supported) bundled libs are packed even without packed_bundled_libs.

r? @petrochenkov

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Dec 12, 2022
@petrochenkov
Copy link
Contributor

I'll review this after the holidays.

@bors

This comment was marked as resolved.

compiler/rustc_metadata/src/native_libs.rs Outdated Show resolved Hide resolved
compiler/rustc_metadata/src/native_libs.rs Outdated Show resolved Hide resolved
compiler/rustc_codegen_ssa/src/back/link.rs Outdated Show resolved Hide resolved
compiler/rustc_codegen_ssa/src/back/link.rs Show resolved Hide resolved
compiler/rustc_codegen_ssa/src/back/link.rs Outdated Show resolved Hide resolved
compiler/rustc_codegen_ssa/src/back/link.rs Outdated Show resolved Hide resolved
@petrochenkov petrochenkov added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jan 11, 2023
@belovdv
Copy link
Contributor Author

belovdv commented Jan 26, 2023

Changes: branch rebased, added run-make test, minor fixes.
@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jan 26, 2023
compiler/rustc_codegen_ssa/src/back/link.rs Outdated Show resolved Hide resolved
compiler/rustc_codegen_ssa/src/back/link.rs Show resolved Hide resolved
compiler/rustc_codegen_ssa/src/back/link.rs Outdated Show resolved Hide resolved
compiler/rustc_codegen_ssa/src/back/link.rs Outdated Show resolved Hide resolved
compiler/rustc_codegen_ssa/src/back/link.rs Show resolved Hide resolved
compiler/rustc_codegen_ssa/src/back/link.rs Outdated Show resolved Hide resolved
@petrochenkov petrochenkov added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jan 27, 2023
@rustbot rustbot added the A-translation Area: Translation infrastructure, and migrating existing diagnostics to SessionDiagnostic label Feb 7, 2023
@rustbot
Copy link
Collaborator

rustbot commented Feb 7, 2023

rustc_error_messages was changed

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

@petrochenkov
Copy link
Contributor

r=me after addressing #105601 (comment) and squashing commits.

@petrochenkov
Copy link
Contributor

@bors r+

@bors
Copy link
Contributor

bors commented Feb 8, 2023

📌 Commit f45b31a38332b6a7eaa20061c514351daf381a2f has been approved by petrochenkov

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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Feb 8, 2023
@bors
Copy link
Contributor

bors commented Feb 9, 2023

⌛ Testing commit f45b31a38332b6a7eaa20061c514351daf381a2f with merge 04b5f1051585446a9b8ca6d7ff5c8fa3e9f960d5...

@petrochenkov
Copy link
Contributor

@bors r+

@bors
Copy link
Contributor

bors commented Feb 10, 2023

📌 Commit 601fc8b has been approved by petrochenkov

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 Feb 10, 2023
compiler-errors added a commit to compiler-errors/rust that referenced this pull request Feb 12, 2023
…e, r=petrochenkov

Enable new rlib in non stable cases

If bundled static library uses cfg (unstable) or whole-archive (wasn't supported) bundled libs are packed even without packed_bundled_libs.

r? `@petrochenkov`
@bors
Copy link
Contributor

bors commented Feb 12, 2023

⌛ Testing commit 601fc8b with merge 51cb561...

@bors
Copy link
Contributor

bors commented Feb 12, 2023

☀️ Test successful - checks-actions
Approved by: petrochenkov
Pushing 51cb561 to master...

1 similar comment
@bors
Copy link
Contributor

bors commented Feb 12, 2023

☀️ Test successful - checks-actions
Approved by: petrochenkov
Pushing 51cb561 to master...

@bors bors added merged-by-bors This PR was explicitly merged by bors. labels Feb 12, 2023
@bors bors merged commit 51cb561 into rust-lang:master Feb 12, 2023
@rustbot rustbot added this to the 1.69.0 milestone Feb 12, 2023
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (51cb561): comparison URL.

Overall result: ❌ regressions - no action needed

@rustbot label: -perf-regression

Instruction count

This is a highly reliable metric that was used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
5.5% [5.5%, 5.5%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Max RSS (memory usage)

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

Cycles

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

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Feb 16, 2023
…l, r=petrochenkov

note issue for feature(packed_bundled_libs)

Add to feature (introduced in rust-lang#105601) gate description number of issue created for it.

r? `@petrochenkov`
bors pushed a commit to rust-lang-ci/rust that referenced this pull request Apr 28, 2023
Fixes rust-lang#110912

Checking `flavor == RlibFlavor::Normal` was accidentally lost in
601fc8b
rust-lang#105601

That caused combining +whole-archive and +bundle link modifiers on
non-rlib crates to fail with a confusing error message saying that
combination is unstable for rlibs. In particular, this caused the
build to fail when +whole-archive was used on staticlib crates, even
though +whole-archive effectively does nothing on non-bin crates because
the final linker invocation is left to an external build system.
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Apr 28, 2023
…b_fix, r=petrochenkov

only error combining +whole-archive and +bundle for rlibs

Fixes rust-lang#110912

Checking `flavor == RlibFlavor::Normal` was accidentally lost in 601fc8b
rust-lang#105601

That caused combining +whole-archive and +bundle link modifiers on non-rlib crates to fail with a confusing error message saying that combination is unstable for rlibs. In particular, this caused the build to fail when +whole-archive was used on staticlib crates, even though +whole-archive effectively does nothing on non-bin crates because the final linker invocation is left to an external build system.

cc `@petrochenkov`
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Apr 28, 2023
…b_fix, r=petrochenkov

only error combining +whole-archive and +bundle for rlibs

Fixes rust-lang#110912

Checking `flavor == RlibFlavor::Normal` was accidentally lost in 601fc8b
rust-lang#105601

That caused combining +whole-archive and +bundle link modifiers on non-rlib crates to fail with a confusing error message saying that combination is unstable for rlibs. In particular, this caused the build to fail when +whole-archive was used on staticlib crates, even though +whole-archive effectively does nothing on non-bin crates because the final linker invocation is left to an external build system.

cc ``@petrochenkov``
RalfJung pushed a commit to RalfJung/miri that referenced this pull request Apr 30, 2023
…petrochenkov

only error combining +whole-archive and +bundle for rlibs

Fixes rust-lang/rust#110912

Checking `flavor == RlibFlavor::Normal` was accidentally lost in 601fc8b36b1962285e371cf3c54eeb3b1b9b3a74
rust-lang/rust#105601

That caused combining +whole-archive and +bundle link modifiers on non-rlib crates to fail with a confusing error message saying that combination is unstable for rlibs. In particular, this caused the build to fail when +whole-archive was used on staticlib crates, even though +whole-archive effectively does nothing on non-bin crates because the final linker invocation is left to an external build system.

cc ``@petrochenkov``
NativeLibKind::Static { bundle: None | Some(true), whole_archive: Some(true) }
if flavor == RlibFlavor::Normal =>
{
// Don't allow mixing +bundle with +whole_archive since an rlib may contain
Copy link
Member

Choose a reason for hiding this comment

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

this comment was lost along with the code, and though the code was readded in #110917, the comment was not readded

Mark-Simulacrum pushed a commit to Mark-Simulacrum/rust that referenced this pull request May 6, 2023
Fixes rust-lang#110912

Checking `flavor == RlibFlavor::Normal` was accidentally lost in
601fc8b
rust-lang#105601

That caused combining +whole-archive and +bundle link modifiers on
non-rlib crates to fail with a confusing error message saying that
combination is unstable for rlibs. In particular, this caused the
build to fail when +whole-archive was used on staticlib crates, even
though +whole-archive effectively does nothing on non-bin crates because
the final linker invocation is left to an external build system.
MabezDev pushed a commit to esp-rs/rust that referenced this pull request May 30, 2023
Fixes rust-lang#110912

Checking `flavor == RlibFlavor::Normal` was accidentally lost in
601fc8b
rust-lang#105601

That caused combining +whole-archive and +bundle link modifiers on
non-rlib crates to fail with a confusing error message saying that
combination is unstable for rlibs. In particular, this caused the
build to fail when +whole-archive was used on staticlib crates, even
though +whole-archive effectively does nothing on non-bin crates because
the final linker invocation is left to an external build system.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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