Skip to content

Enable limit_rdylib_exports on Solaris - #145175

Closed
bjorn3 wants to merge 2 commits into
rust-lang:masterfrom
bjorn3:solaris_limit_rdylib_exports
Closed

Enable limit_rdylib_exports on Solaris#145175
bjorn3 wants to merge 2 commits into
rust-lang:masterfrom
bjorn3:solaris_limit_rdylib_exports

Conversation

@bjorn3

Copy link
Copy Markdown
Member

This (poorly named) target option controls whether or not cdylibs will export mangled rust symbols rather than just unmangled symbols. Presumably at some point in the past support for this wasn't implemented yet for Solaris, but cg_ssa::back::linker does have handling for this on Solaris now. And one of the Solaris target maintainers confirmed that building Rust with this option enabled works fine for them on Solaris: #t-compiler > solaris limit_rdylib_exports @ 💬

This (poorly named) target option controls whether or not cdylibs will
export mangled rust symbols rather than just unmangled symbols.
Presumably at some point in the past support for this wasn't implemented
yet for Solaris, but cg_ssa::back::linker does have handling for this on
Solaris now. And one of the Solaris target maintainers confirmed that
building Rust with this option enabled works fine for them on Solaris.
@rustbot

Copy link
Copy Markdown
Collaborator

r? @davidtwco

rustbot has assigned @davidtwco.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbotrustbot 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 Aug 9, 2025
@rustbot

Copy link
Copy Markdown
Collaborator

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

@bjorn3

Copy link
Copy Markdown
MemberAuthor

cc @psumbera

@lqd

lqd commented Aug 9, 2025

Copy link
Copy Markdown
Member

I had read that conversation. I don't know if you want (or can) do try builds with this, and as you said psumbera tested it already.

Either way, r? lqd r=me whenever you want.

@rustbotrustbot assigned lqd and unassigned davidtwcoAug 9, 2025
@lqd

lqd commented Aug 9, 2025

Copy link
Copy Markdown
Member

@bors r+

@bors

bors commented Aug 9, 2025

Copy link
Copy Markdown
Collaborator

📌 Commit 6de338b has been approved by lqd

It is now in the queue for this repository.

@borsbors 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 Aug 9, 2025
Zalathar added a commit to Zalathar/rust that referenced this pull request Aug 10, 2025
…s, r=lqd
Enable limit_rdylib_exports on Solaris
This (poorly named) target option controls whether or not cdylibs will export mangled rust symbols rather than just unmangled symbols. Presumably at some point in the past support for this wasn't implemented yet for Solaris, but cg_ssa::back::linker does have handling for this on Solaris now. And one of the Solaris target maintainers confirmed that building Rust with this option enabled works fine for them on Solaris: [#t-compiler > solaris limit_rdylib_exports @ 💬](https://rust-lang.zulipchat.com/#narrow/channel/131828-t-compiler/topic/solaris.20limit_rdylib_exports/near/533480771)
@ZalatharZalathar mentioned this pull request Aug 10, 2025
Zalathar added a commit to Zalathar/rust that referenced this pull request Aug 10, 2025
…s, r=lqd
Enable limit_rdylib_exports on Solaris
This (poorly named) target option controls whether or not cdylibs will export mangled rust symbols rather than just unmangled symbols. Presumably at some point in the past support for this wasn't implemented yet for Solaris, but cg_ssa::back::linker does have handling for this on Solaris now. And one of the Solaris target maintainers confirmed that building Rust with this option enabled works fine for them on Solaris: [#t-compiler > solaris limit_rdylib_exports @ 💬](https://rust-lang.zulipchat.com/#narrow/channel/131828-t-compiler/topic/solaris.20limit_rdylib_exports/near/533480771)
@ZalatharZalathar mentioned this pull request Aug 10, 2025
Zalathar added a commit to Zalathar/rust that referenced this pull request Aug 10, 2025
…s, r=lqd
Enable limit_rdylib_exports on Solaris
This (poorly named) target option controls whether or not cdylibs will export mangled rust symbols rather than just unmangled symbols. Presumably at some point in the past support for this wasn't implemented yet for Solaris, but cg_ssa::back::linker does have handling for this on Solaris now. And one of the Solaris target maintainers confirmed that building Rust with this option enabled works fine for them on Solaris: [#t-compiler > solaris limit_rdylib_exports @ 💬](https://rust-lang.zulipchat.com/#narrow/channel/131828-t-compiler/topic/solaris.20limit_rdylib_exports/near/533480771)
@ZalatharZalathar mentioned this pull request Aug 10, 2025
bors added a commit that referenced this pull request Aug 10, 2025
Rollup of 19 pull requests
Successful merges:
- #141624 (unstable-book: Add stubs for environment variables; document some of the important ones)
- #143093 (Simplify polonius location-sensitive analysis)
- #144402 (Stabilize loongarch32 inline asm)
- #144403 (`tests/ui/issues/`: The Issues Strike Back [4/N])
- #144544 (Start reporting future breakage for `ILL_FORMED_ATTRIBUTE_INPUT` in dependencies)
- #144739 (Use new public libtest `ERROR_EXIT_CODE` constant in rustdoc)
- #145089 (Improve error output when a command fails in bootstrap)
- #145112 ([win][arm64ec] Partial fix for raw-dylib-link-ordinal on Arm64EC)
- #145129 ([win][arm64ec] Add `/machine:arm64ec` when linking LLVM as Arm64EC)
- #145130 (improve "Documentation problem" issue template.)
- #145135 (Stabilize `duration_constructors_lite` feature)
- #145145 (some `derive_more` refactors)
- #145147 (rename `TraitRef::from_method` to `from_assoc`)
- #145156 (Override custom Cargo `build-dir` in bootstrap)
- #145160 (Change days-threshold to 28 in [behind-upstream])
- #145162 (`{BTree,Hash}Map`: add "`Entry` API" section heading)
- #145175 (Enable limit_rdylib_exports on Solaris)
- #145187 (Fix an unstable feature comment that wasn't a doc comment)
- #145191 (`suggest_borrow_generic_arg`: use the correct generic args)
r? `@ghost`
`@rustbot` modify labels: rollup
Zalathar added a commit to Zalathar/rust that referenced this pull request Aug 10, 2025
…s, r=lqd
Enable limit_rdylib_exports on Solaris
This (poorly named) target option controls whether or not cdylibs will export mangled rust symbols rather than just unmangled symbols. Presumably at some point in the past support for this wasn't implemented yet for Solaris, but cg_ssa::back::linker does have handling for this on Solaris now. And one of the Solaris target maintainers confirmed that building Rust with this option enabled works fine for them on Solaris: [#t-compiler > solaris limit_rdylib_exports @ 💬](https://rust-lang.zulipchat.com/#narrow/channel/131828-t-compiler/topic/solaris.20limit_rdylib_exports/near/533480771)
@ZalatharZalathar mentioned this pull request Aug 10, 2025
bors added a commit that referenced this pull request Aug 10, 2025
Rollup of 18 pull requests
Successful merges:
- #141624 (unstable-book: Add stubs for environment variables; document some of the important ones)
- #143093 (Simplify polonius location-sensitive analysis)
- #144402 (Stabilize loongarch32 inline asm)
- #144403 (`tests/ui/issues/`: The Issues Strike Back [4/N])
- #144739 (Use new public libtest `ERROR_EXIT_CODE` constant in rustdoc)
- #145089 (Improve error output when a command fails in bootstrap)
- #145112 ([win][arm64ec] Partial fix for raw-dylib-link-ordinal on Arm64EC)
- #145129 ([win][arm64ec] Add `/machine:arm64ec` when linking LLVM as Arm64EC)
- #145130 (improve "Documentation problem" issue template.)
- #145135 (Stabilize `duration_constructors_lite` feature)
- #145145 (some `derive_more` refactors)
- #145147 (rename `TraitRef::from_method` to `from_assoc`)
- #145156 (Override custom Cargo `build-dir` in bootstrap)
- #145160 (Change days-threshold to 28 in [behind-upstream])
- #145162 (`{BTree,Hash}Map`: add "`Entry` API" section heading)
- #145175 (Enable limit_rdylib_exports on Solaris)
- #145187 (Fix an unstable feature comment that wasn't a doc comment)
- #145191 (`suggest_borrow_generic_arg`: use the correct generic args)
r? `@ghost`
`@rustbot` modify labels: rollup
@Zalathar

Copy link
Copy Markdown
Member

Possibly failed in rollup: #145204 (comment)

@bors r-
@bors try jobs=dist-sparcv9-solaris

@borsbors 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-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Aug 10, 2025
@rust-bors

rust-borsBot commented Aug 10, 2025

Copy link
Copy Markdown
Contributor

⌛ Trying commit 6de338b with merge 0b6aaac

To cancel the try build, run the command @bors try cancel.

rust-borsBot added a commit that referenced this pull request Aug 10, 2025
Enable limit_rdylib_exports on Solaris
try-job: dist-sparcv9-solaris
@rust-log-analyzer

This comment has been minimized.

@rust-bors

rust-borsBot commented Aug 10, 2025

Copy link
Copy Markdown
Contributor

💔 Test failed (CI). Failed jobs:

@rustbot

Copy link
Copy Markdown
Collaborator

Some changes occurred in compiler/rustc_codegen_ssa

cc @WaffleLapkin

@bjorn3

Copy link
Copy Markdown
MemberAuthor

@bors2 try jobs=dist-sparcv9-solaris

rust-borsBot added a commit that referenced this pull request Aug 13, 2025
Enable limit_rdylib_exports on Solaris
try-job: dist-sparcv9-solaris
@rust-bors

This comment has been minimized.

@rust-bors

rust-borsBot commented Aug 13, 2025

Copy link
Copy Markdown
Contributor

💔 Test for 058e0cd failed: CI. Failed jobs:

@rust-log-analyzer

Copy link
Copy Markdown
Collaborator

The job dist-sparcv9-solaris failed! Check out the build log: (web)(plain enhanced)(plain)

Click to see the possible cause of the failure (guessed by this bot)
[RUSTC-TIMING] gimli test:false 4.513
[RUSTC-TIMING] object test:false 5.925
error: linking with `sparcv9-solaris-gcc` failed: exit status: 1
|
= note: "sparcv9-solaris-gcc" "-Wl,-M" "-Wl,/tmp/rustckoVf17/list" "-m64" "/tmp/rustckoVf17/symbols.o" "<1 object files omitted>" "/tmp/rustckoVf17/rmeta.o" "<1 object files omitted>" "-Wl,-z,ignore" "-Wl,-Bdynamic" "-lsocket" "-lposix4" "-lpthread" "-lresolv" "-Wl,-Bstatic" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/sparcv9-sun-solaris/release/deps/{libpanic_unwind-576066aea71040b7,libobject-42de11fbaba8a6f0,libmemchr-1269b5819ad29d5f,libaddr2line-ffa399e8d33a727a,libgimli-7718c281d3f7ddfe,librustc_demangle-18d5e4a68e177ea3,libstd_detect-a9f0a5ddeb619a4a,libhashbrown-7335bdf04caedc95,librustc_std_workspace_alloc-8b303960f4369ed2,libminiz_oxide-244fbf42d1952c98,libadler2-fdef1fc9ab9a4e63,libunwind-147d300e73828b63,libcfg_if-77b8b4f011955e2d,liblibc-3a8e43a40000b5f2,librustc_std_workspace_core-089abc0fb4aa3ed2,liballoc-cb97d4135d2d8cba,libcore-2b2fea2b0a75a66f,libcompiler_builtins-a2eaffc63113988a}.rlib" "-Wl,-Bdynamic" "-lgcc_s" "-lc" "-lm" "-lrt" "-lpthread" "-lsendfile" "-llgrp" "-L" "/tmp/rustckoVf17/raw-dylibs" "-L" "<sysroot>-std/sparcv9-sun-solaris/release/build/compiler_builtins-8df8598ce8895c14/out" "-o" "<sysroot>-std/sparcv9-sun-solaris/release/deps/libstd-db8c12fe786efb99.so" "-shared" "-Wl,-soname=libstd-db8c12fe786efb99.so" "-nodefaultlibs" "-Wl,-z,origin" "-Wl,-rpath,$ORIGIN/../lib"
= note: some arguments are omitted. use `--verbose` to show all linker arguments
= note: /opt/solaris/sparcv9/lib/gcc/sparcv9-pc-solaris2.11/8.4.0/../../../../sparcv9-pc-solaris2.11/bin/ld: warning: -z ignore ignored
/opt/solaris/sparcv9/lib/gcc/sparcv9-pc-solaris2.11/8.4.0/../../../../sparcv9-pc-solaris2.11/bin/ld:/tmp/rustckoVf17/list: file format not recognized; treating as linker script
/opt/solaris/sparcv9/lib/gcc/sparcv9-pc-solaris2.11/8.4.0/../../../../sparcv9-pc-solaris2.11/bin/ld:/tmp/rustckoVf17/list:1: syntax error
collect2: error: ld returned 1 exit status
[RUSTC-TIMING] std test:false 15.731
error: could not compile `std` (lib) due to 1 previous error

@bjorn3

Copy link
Copy Markdown
MemberAuthor

No clue why this fails. I guess I will just leave limit_rdylib_exports disabled.

@bjorn3bjorn3 closed this Aug 14, 2025
@rustbotrustbot removed the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Aug 14, 2025
@bjorn3
bjorn3 deleted the solaris_limit_rdylib_exports branch August 14, 2025 15:21
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

T-compilerRelevant 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

@bjorn3@rustbot@lqd@bors@Zalathar@rust-log-analyzer@davidtwco