File tree Expand file tree Collapse file tree 3 files changed +10
-5
lines changed
compiler/rustc_codegen_ssa/src/back
src/test/run-make/raw-dylib-c Expand file tree Collapse file tree 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(
22122212 NativeLibKind :: Dylib { as_needed } => {
22132213 cmd. link_dylib ( name, verbatim, as_needed. unwrap_or ( true ) )
22142214 }
2215- NativeLibKind :: Unspecified => cmd. link_dylib ( name, verbatim, true ) ,
2215+ NativeLibKind :: RawDylib | NativeLibKind :: Unspecified => {
2216+ cmd. link_dylib ( name, verbatim, true )
2217+ }
22162218 NativeLibKind :: Framework { as_needed } => {
22172219 cmd. link_framework ( name, as_needed. unwrap_or ( true ) )
22182220 }
@@ -2233,10 +2235,6 @@ fn add_local_native_libraries(
22332235 cmd. link_staticlib ( name, verbatim)
22342236 }
22352237 }
2236- NativeLibKind :: RawDylib => {
2237- // FIXME(#58713): Proper handling for raw dylibs.
2238- bug ! ( "raw_dylib feature not yet implemented" ) ;
2239- }
22402238 }
22412239 }
22422240}
Original file line number Diff line number Diff line change 1616endif
1717 $(RUSTC) --crate-type lib --crate-name raw_dylib_test lib.rs
1818 $(RUSTC) --crate-type bin driver.rs -L "$(TMPDIR)"
19+ $(RUSTC) --crate-type bin --crate-name raw_dylib_test_bin lib.rs
1920 "$(TMPDIR)"/driver > "$(TMPDIR)"/output.txt
21+ "$(TMPDIR)"/raw_dylib_test_bin > "$(TMPDIR)"/output_bin.txt
2022
2123ifdef RUSTC_BLESS_TEST
2224 cp "$(TMPDIR)"/output.txt output.txt
2325else
2426 $(DIFF) output.txt "$(TMPDIR)"/output.txt
27+ $(DIFF) output.txt "$(TMPDIR)"/output_bin.txt
2528endif
Original file line number Diff line number Diff line change @@ -20,3 +20,7 @@ pub fn library_function() {
2020 extern_fn_3 ( ) ;
2121 }
2222}
23+
24+ fn main ( ) {
25+ library_function ( ) ;
26+ }
You can’t perform that action at this time.
0 commit comments