File tree Expand file tree Collapse file tree 4 files changed +8
-10
lines changed
compiler/rustc_target/src/spec/base
wasm-stringify-ints-small Expand file tree Collapse file tree 4 files changed +8
-10
lines changed Original file line number Diff line number Diff line change @@ -28,16 +28,6 @@ pub(crate) fn options() -> TargetOptions {
2828 // stack overflow will be guaranteed to trap as it underflows instead of
2929 // corrupting static data.
3030 concat!( $prefix, "--stack-first" ) ,
31- // FIXME we probably shouldn't pass this but instead pass an explicit list
32- // of symbols we'll allow to be undefined. We don't currently have a
33- // mechanism of knowing, however, which symbols are intended to be imported
34- // from the environment and which are intended to be imported from other
35- // objects linked elsewhere. This is a coarse approximation but is sure to
36- // hide some bugs and frustrate someone at some point, so we should ideally
37- // work towards a world where we can explicitly list symbols that are
38- // supposed to be imported and have all other symbols generate errors if
39- // they remain undefined.
40- concat!( $prefix, "--allow-undefined" ) ,
4131 // LLD only implements C++-like demangling, which doesn't match our own
4232 // mangling scheme. Tell LLD to not demangle anything and leave it up to
4333 // us to demangle these symbols later. Currently rustc does not perform
Original file line number Diff line number Diff line change 11#![ crate_type = "cdylib" ]
22
3+ #[ link( wasm_import_module = "the-world" ) ]
34extern "C" {
45 fn observe ( ptr : * const u8 , len : usize ) ;
56}
67
78macro_rules! s {
89 ( $( $f: ident -> $t: ty ) ;* $( ; ) * ) => {
910 $(
11+ #[ link( wasm_import_module = "the-world" ) ]
1012 extern "C" {
1113 fn $f( ) -> $t;
1214 }
Original file line number Diff line number Diff line change @@ -14,6 +14,11 @@ unsafe extern "Rust" {
1414 fn __rust_alloc_error_handler ( size : usize , align : usize ) -> !;
1515}
1616
17+ #[ rustc_std_internal_symbol]
18+ pub unsafe fn __rdl_alloc_error_handler ( _size : usize , _align : usize ) -> ! {
19+ loop { }
20+ }
21+
1722#[ used]
1823static mut BUF : [ u8 ; 1024 ] = [ 0 ; 1024 ] ;
1924
Original file line number Diff line number Diff line change 11//@ run-pass
22//@ ignore-windows-gnu: only statics marked with used can be GC-ed on windows-gnu
3+ //@ ignore-wasm: wasm, for better or worse, exports all #[no_mangle]
34
45// Regression test for <https://github.com/rust-lang/rust/issues/139744>.
56// Functions in the binary marked with no_mangle should be GC-ed if they
You can’t perform that action at this time.
0 commit comments