File tree 3 files changed +10
-5
lines changed
compiler/rustc_codegen_ssa/src/back
src/test/run-make/raw-dylib-c
3 files changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -2212,7 +2212,9 @@ fn add_local_native_libraries(
2212
2212
NativeLibKind :: Dylib { as_needed } => {
2213
2213
cmd. link_dylib ( name, verbatim, as_needed. unwrap_or ( true ) )
2214
2214
}
2215
- NativeLibKind :: Unspecified => cmd. link_dylib ( name, verbatim, true ) ,
2215
+ NativeLibKind :: RawDylib | NativeLibKind :: Unspecified => {
2216
+ cmd. link_dylib ( name, verbatim, true )
2217
+ }
2216
2218
NativeLibKind :: Framework { as_needed } => {
2217
2219
cmd. link_framework ( name, as_needed. unwrap_or ( true ) )
2218
2220
}
@@ -2233,10 +2235,6 @@ fn add_local_native_libraries(
2233
2235
cmd. link_staticlib ( name, verbatim)
2234
2236
}
2235
2237
}
2236
- NativeLibKind :: RawDylib => {
2237
- // FIXME(#58713): Proper handling for raw dylibs.
2238
- bug ! ( "raw_dylib feature not yet implemented" ) ;
2239
- }
2240
2238
}
2241
2239
}
2242
2240
}
Original file line number Diff line number Diff line change 16
16
endif
17
17
$(RUSTC) --crate-type lib --crate-name raw_dylib_test lib.rs
18
18
$(RUSTC) --crate-type bin driver.rs -L "$(TMPDIR)"
19
+ $(RUSTC) --crate-type bin --crate-name raw_dylib_test_bin lib.rs
19
20
"$(TMPDIR)"/driver > "$(TMPDIR)"/output.txt
21
+ "$(TMPDIR)"/raw_dylib_test_bin > "$(TMPDIR)"/output_bin.txt
20
22
21
23
ifdef RUSTC_BLESS_TEST
22
24
cp "$(TMPDIR)"/output.txt output.txt
23
25
else
24
26
$(DIFF) output.txt "$(TMPDIR)"/output.txt
27
+ $(DIFF) output.txt "$(TMPDIR)"/output_bin.txt
25
28
endif
Original file line number Diff line number Diff line change @@ -20,3 +20,7 @@ pub fn library_function() {
20
20
extern_fn_3 ( ) ;
21
21
}
22
22
}
23
+
24
+ fn main ( ) {
25
+ library_function ( ) ;
26
+ }
You can’t perform that action at this time.
0 commit comments