Skip to content

Enable static-pie on all Musl targets - #166191

Merged
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
bjorn3:musl_static_pie
Nov 23, 2026
Merged

rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
bjorn3:musl_static_pie

Conversation

@bjorn3

@bjorn3 bjorn3 commented Nov 19, 2026

Copy link
Copy Markdown
Member

This enables ASLR and I don't see a reason not to enable it outside x86_64. Musl supports it just fine and in fact Alpine Linux already patches rustc to enable it on all Musl targets.

cc @Gelbpunkt

This enables ASLR and I don't see a reason not to enable it outside
x86_64. Musl supports it just fine and in fact Alpine Linux already
patches rustc to enable it on all Musl targets.
@bjorn3 bjorn3 added the O-musl Target: The musl libc label Nov 19, 2026
@rustbot

rustbot commented Nov 19, 2026

Copy link
Copy Markdown
Collaborator

These commits modify compiler targets.
(See the Target Tier Policy.)

@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 Nov 19, 2026
@rustbot

This comment was marked as outdated.

@Gelbpunkt

Copy link
Copy Markdown
Contributor

LGTM, I've been wanting to upstream this for a while already but never remembered it when I had time. Thanks! This should probably be in relnotes?

@fmease

fmease commented Nov 21, 2026

Copy link
Copy Markdown
Member

r? petrochenkov (#70740)

@rustbot rustbot assigned petrochenkov and unassigned fmease Nov 21, 2026
@petrochenkov

Copy link
Copy Markdown
Contributor

@bors r+

@rust-bors

rust-bors Bot commented Nov 23, 2026

Copy link
Copy Markdown
Contributor

📌 Commit d1b11ad has been approved by petrochenkov

It is now in the queue for this repository.

@rust-bors rust-bors Bot 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 Nov 23, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Nov 23, 2026
…nkov

Enable static-pie on all Musl targets

This enables ASLR and I don't see a reason not to enable it outside x86_64. Musl supports it just fine and in fact Alpine Linux already patches rustc to enable it on all Musl targets.

cc @Gelbpunkt
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Nov 23, 2026
…nkov

Enable static-pie on all Musl targets

This enables ASLR and I don't see a reason not to enable it outside x86_64. Musl supports it just fine and in fact Alpine Linux already patches rustc to enable it on all Musl targets.

cc @Gelbpunkt
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Nov 23, 2026
…nkov

Enable static-pie on all Musl targets

This enables ASLR and I don't see a reason not to enable it outside x86_64. Musl supports it just fine and in fact Alpine Linux already patches rustc to enable it on all Musl targets.

cc @Gelbpunkt
rust-bors Bot pushed a commit that referenced this pull request Nov 23, 2026
…uwer

Rollup of 5 pull requests

Successful merges:

 - #164918 (Move lint validation to attribute parsing)
 - #166381 (`rust-analyzer` subtree update)
 - #166191 (Enable static-pie on all Musl targets)
 - #166250 (Add a reason suggestion for malformed lint attributes)
 - #166365 (Drop references to codebuild)

Failed merges:

 - #166374 (Undo accidental duplication checking for attributes on macro calls)
rust-bors Bot pushed a commit that referenced this pull request Nov 23, 2026
…uwer

Rollup of 6 pull requests

Successful merges:

 - #164918 (Move lint validation to attribute parsing)
 - #166381 (`rust-analyzer` subtree update)
 - #166191 (Enable static-pie on all Musl targets)
 - #166390 (Turn `gca` into a macro 2.0 that expands to `k#gca(..)`)
 - #165764 (view-types: handle field accesses)
 - #166250 (Add a reason suggestion for malformed lint attributes)

Failed merges:

 - #166374 (Undo accidental duplication checking for attributes on macro calls)
@rust-bors
rust-bors Bot merged commit d1b4633 into rust-lang:main Nov 23, 2026
14 checks passed
@rustbot rustbot added this to the 1.102.0 milestone Nov 23, 2026
rust-bors Bot pushed a commit that referenced this pull request Nov 23, 2026
Rollup merge of #166191 - bjorn3:musl_static_pie, r=petrochenkov

Enable static-pie on all Musl targets

This enables ASLR and I don't see a reason not to enable it outside x86_64. Musl supports it just fine and in fact Alpine Linux already patches rustc to enable it on all Musl targets.

cc @Gelbpunkt
@bjorn3
bjorn3 deleted the musl_static_pie branch November 23, 2026 18:29
@rust-timer

Copy link
Copy Markdown

Note

This PR was benchmarked as part of triage of its containing rollup: triage URL.

Finished benchmarking commit (8d6c511): comparison URL.

Overall result: ❌✅ regressions and improvements - please read:

Our benchmarks found a performance regression caused by this PR.
This might be an actual regression, but it can also be just noise.

Next Steps:

  • If the regression was expected or you think it can be justified,
    please write a comment with sufficient written justification, and add
    @rustbot label: +perf-regression-triaged to it, to mark the regression as triaged.
  • If you think that you know of a way to resolve the regression, try to create
    a new PR with a fix for the regression.
  • If you do not understand the regression or you think that it is just noise,
    you can ask the @rust-lang/wg-compiler-performance working group for help (members of this group
    were not yet notified of this PR).

@rustbot label: +perf-regression

Instruction count

Our most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
0.1% [0.1%, 0.1%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.8% [-1.2%, -0.1%] 9
All ❌✅ (primary) - - 0

Max RSS (memory usage)

This perf run didn't have relevant results for this metric.

Cycles

Results (secondary 3.0%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
6.8% [4.5%, 8.9%] 4
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-4.5% [-4.9%, -4.0%] 2
All ❌✅ (primary) - - 0

Binary size

This perf run didn't have relevant results for this metric.

Artifact size: 406.40 MiB -> 405.79 MiB (-0.15%)

@rustbot rustbot added the perf-regression Performance regression. label Nov 24, 2026
@tgross35

tgross35 commented Nov 24, 2026 •

Copy link
Copy Markdown
Member

I think this may have caused a regression, running on arm now hits a segfault e.g. rust-lang/libc#5776. Looks like that happens before getting to main. Still digging...

Edit: rust-lang/libc#5778

flip1995 pushed a commit to flip1995/rust-clippy that referenced this pull request Nov 26, 2026
…uwer

Rollup of 6 pull requests

Successful merges:

 - rust-lang/rust#164918 (Move lint validation to attribute parsing)
 - rust-lang/rust#166381 (`rust-analyzer` subtree update)
 - rust-lang/rust#166191 (Enable static-pie on all Musl targets)
 - rust-lang/rust#166390 (Turn `gca` into a macro 2.0 that expands to `k#gca(..)`)
 - rust-lang/rust#165764 (view-types: handle field accesses)
 - rust-lang/rust#166250 (Add a reason suggestion for malformed lint attributes)

Failed merges:

 - rust-lang/rust#166374 (Undo accidental duplication checking for attributes on macro calls)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

O-musl Target: The musl libc perf-regression Performance regression. 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