diff options
| author | hyd-dev <yd-huang@outlook.com> | 2021-08-14 23:24:33 +0800 |
|---|---|---|
| committer | hyd-dev <yd-huang@outlook.com> | 2021-08-15 02:59:53 +0800 |
| commit | 29b73ee5fa04e4ccbd1468e50fb88470b03d4d27 (patch) | |
| tree | c54de097386027c21da41d4881a397367148944e /src/test/codegen | |
| parent | 9315a0cd4c3b9568e66cf613fecad1bfac214f53 (diff) | |
| download | rust-29b73ee5fa04e4ccbd1468e50fb88470b03d4d27.tar.gz rust-29b73ee5fa04e4ccbd1468e50fb88470b03d4d27.zip | |
Fix `reachable_set` for non-function items in non-library crates
Diffstat (limited to 'src/test/codegen')
| -rw-r--r-- | src/test/codegen/external-no-mangle-statics.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/test/codegen/external-no-mangle-statics.rs b/src/test/codegen/external-no-mangle-statics.rs index feb4af6286e..6274434cd8f 100644 --- a/src/test/codegen/external-no-mangle-statics.rs +++ b/src/test/codegen/external-no-mangle-statics.rs @@ -1,10 +1,11 @@ +// revisions: lib staticlib // ignore-emscripten default visibility is hidden // compile-flags: -O // `#[no_mangle]`d static variables always have external linkage, i.e., no `internal` in their // definitions -#![crate_type = "lib"] -#![no_std] +#![cfg_attr(lib, crate_type = "lib")] +#![cfg_attr(staticlib, crate_type = "staticlib")] // CHECK: @A = local_unnamed_addr constant #[no_mangle] |
