Skip to content

Enable limit_rdylib_exports on Solaris #145175

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bjorn3
Copy link
Member

@bjorn3 bjorn3 commented Aug 9, 2025

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
Collaborator

rustbot commented Aug 9, 2025

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

@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 Aug 9, 2025
@rustbot
Copy link
Collaborator

rustbot commented Aug 9, 2025

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

@bjorn3
Copy link
Member Author

bjorn3 commented Aug 9, 2025

cc @psumbera

@lqd
Copy link
Member

lqd commented Aug 9, 2025

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.

@rustbot rustbot assigned lqd and unassigned davidtwco Aug 9, 2025
@lqd
Copy link
Member

lqd commented Aug 9, 2025

@bors r+

@bors
Copy link
Collaborator

bors commented Aug 9, 2025

📌 Commit 6de338b has been approved by lqd

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 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)
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)
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)
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)
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
Contributor

Possibly failed in rollup: #145204 (comment)

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

@bors bors 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
Copy link

rust-bors bot commented Aug 10, 2025

⌛ Trying commit 6de338b with merge 0b6aaac

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

rust-bors bot 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
Copy link
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.460
[RUSTC-TIMING] object test:false 5.805
error: linking with `sparcv9-solaris-gcc` failed: exit status: 1
  |
  = note:  "sparcv9-solaris-gcc" "-Wl,-M" "-Wl,/tmp/rustc6fNRTr/list" "-m64" "/tmp/rustc6fNRTr/symbols.o" "<1 object files omitted>" "/tmp/rustc6fNRTr/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/rustc6fNRTr/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/rustc6fNRTr/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/rustc6fNRTr/list:1: syntax error
          collect2: error: ld returned 1 exit status
          

[RUSTC-TIMING] std test:false 15.170
error: could not compile `std` (lib) due to 1 previous error

@rust-bors
Copy link

rust-bors bot commented Aug 10, 2025

💔 Test failed (CI). Failed jobs:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. 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