Use .drectve for MSVC DLL exports#158294
Conversation
While it would be reasonable to expect the Windows linker to handle linker args in the .drectve section identical to cli arguments, as it turns out exporting weak symbols only works when the /EXPORT is in the .drectve section, not when it is a linker argument or when a .DEF file is used.
|
r? @oli-obk rustbot has assigned @oli-obk. Use Why was this reviewer chosen?The reviewer was selected based on:
|
This comment has been minimized.
This comment has been minimized.
b0075d5 to
4051560
Compare
|
Updated :) @rustbot ready |
|
Maybe rollup=iffy? Linkage related things tend to be tricky. |
|
@bors rollup=iffy reason=windows linker shenanigans |
…, r=oli-obk Use .drectve for MSVC DLL exports This is a continuation of rust-lang#142568. This fixes the i686 MSVC issue mentioned there: `.def` files accept undecorated names, but `.drectve` `/EXPORT` needs decorated symbol names. The public export name is preserved with `EXPORTAS`. It's worth noting that EII with defaults now also works on MSVC.
…, r=oli-obk Use .drectve for MSVC DLL exports This is a continuation of rust-lang#142568. This fixes the i686 MSVC issue mentioned there: `.def` files accept undecorated names, but `.drectve` `/EXPORT` needs decorated symbol names. The public export name is preserved with `EXPORTAS`. It's worth noting that EII with defaults now also works on MSVC.
…, r=oli-obk Use .drectve for MSVC DLL exports This is a continuation of rust-lang#142568. This fixes the i686 MSVC issue mentioned there: `.def` files accept undecorated names, but `.drectve` `/EXPORT` needs decorated symbol names. The public export name is preserved with `EXPORTAS`. It's worth noting that EII with defaults now also works on MSVC.
…uwer Rollup of 17 pull requests Successful merges: - #153697 (Add arg splat experiment initial tuple impl) - #158294 (Use .drectve for MSVC DLL exports) - #158253 (codegen_ssa: multiply scalable vec size by `vscale`) - #158308 (Fix bug when rustdoc "go to only result" setting is not working as expected") - #158345 (Use `transmute_neo` in `assume_init`) - #158369 (std: abort when `resume_unwind` is called inside the panic hook) - #158374 (disallow tail calling extern "rust-call" functions) - #158380 (Revert "rebuild LLVM when `bootstrap.toml` config changes") - #154398 (Add test for async Send with PhantomData<*mut ()> + unsafe impl Send + dyn Trait) - #157181 (autodiff: stop always needing an alloca) - #158278 (autodiff - typtree cleanups) - #158311 (doc(unstable-book): fix typo "earier" -> "earlier" in default-visibility flag) - #158318 (Make normalization in a test case resilient to dist compilation) - #158338 (Reorganize `tests/ui/issues` [14/N]) - #158343 (Include `Item::const_stability` info in rustdoc JSON.) - #158355 (Fixup the refactoring errors in #156246) - #158390 (Fix: auto trait, const trait bound) Failed merges: - #155535 (export symbols: support macos/windows(32/64))
|
💔 I suspect this PR failed tests as part of a rollup After fixing the problem, consider running a try job for the failed job before re-approving. Link to failure: #158391 (comment) |
|
This pull request was unapproved. This PR was contained in a rollup (#158391), which was unapproved. |
Thanks a lot btw, this helped in finding the pr :3 |
This is a continuation of #142568.
This fixes the i686 MSVC issue mentioned there:
.deffiles accept undecorated names, but.drectve/EXPORTneeds decorated symbol names. The public export name is preserved withEXPORTAS.It's worth noting that EII with defaults now also works on MSVC.