File tree 3 files changed +21
-19
lines changed
src/tools/run-make-support/src
tests/run-make/windows-safeseh
3 files changed +21
-19
lines changed Original file line number Diff line number Diff line change @@ -203,6 +203,12 @@ impl Rustc {
203
203
self
204
204
}
205
205
206
+ /// Specify the linker
207
+ pub fn linker ( & mut self , linker : & str ) -> & mut Self {
208
+ self . cmd . arg ( format ! ( "-Clinker={linker}" ) ) ;
209
+ self
210
+ }
211
+
206
212
/// Get the [`Output`] of the finished process.
207
213
#[ track_caller]
208
214
pub fn command_output ( & mut self ) -> :: std:: process:: Output {
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ //@ only-windows
2
+ //@ needs-rust-lld
3
+
4
+ use run_make_support:: rustc;
5
+
6
+ fn main ( ) {
7
+ // Ensure that LLD can link when an .rlib contains a synthetic object
8
+ // file referencing exported or used symbols.
9
+ rustc ( ) . input ( "foo.rs" ) . linker ( "rust-lld" ) . run ( ) ;
10
+
11
+ // Ensure that LLD can link when /WHOLEARCHIVE: is used with an .rlib.
12
+ // Previously, lib.rmeta was not marked as (trivially) SAFESEH-aware.
13
+ rustc ( ) . input ( "baz.rs" ) . run ( ) ;
14
+ rustc ( ) . input ( "bar.rs" ) . linker ( "rust-lld" ) . link_arg ( "/WHOLEARCHIVE:libbaz.rlib" ) . run ( ) ;
15
+ }
You can’t perform that action at this time.
0 commit comments