diff options
| author | hyd-dev <yd-huang@outlook.com> | 2021-03-23 02:38:30 +0800 |
|---|---|---|
| committer | hyd-dev <yd-huang@outlook.com> | 2021-03-23 04:39:58 +0800 |
| commit | f900ee331dfe95493390e1beecb82a277158b60b (patch) | |
| tree | 3cf8a830278c5cfba830276b1a603fee985c88ff /src/test | |
| parent | 2b8fbe6b0b6db7960828bd2c9a50e52c9a5d0aef (diff) | |
| download | rust-f900ee331dfe95493390e1beecb82a277158b60b.tar.gz rust-f900ee331dfe95493390e1beecb82a277158b60b.zip | |
Allow not emitting `uwtable` on Android
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/codegen/default-requires-uwtable.rs | 15 | ||||
| -rw-r--r-- | src/test/codegen/force-no-unwind-tables.rs | 7 |
2 files changed, 22 insertions, 0 deletions
diff --git a/src/test/codegen/default-requires-uwtable.rs b/src/test/codegen/default-requires-uwtable.rs new file mode 100644 index 00000000000..d4c4200c5d2 --- /dev/null +++ b/src/test/codegen/default-requires-uwtable.rs @@ -0,0 +1,15 @@ +// revisions: WINDOWS ANDROID +// needs-llvm-components: x86 arm +// compile-flags: -C panic=abort +// [WINDOWS] compile-flags: --target=x86_64-pc-windows-msvc +// [ANDROID] compile-flags: --target=armv7-linux-androideabi + +#![feature(no_core, lang_items)] +#![crate_type = "lib"] +#![no_core] + +#[lang = "sized"] +trait Sized {} + +// CHECK: attributes #{{.*}} uwtable +pub fn foo() {} diff --git a/src/test/codegen/force-no-unwind-tables.rs b/src/test/codegen/force-no-unwind-tables.rs new file mode 100644 index 00000000000..dc77e6cb709 --- /dev/null +++ b/src/test/codegen/force-no-unwind-tables.rs @@ -0,0 +1,7 @@ +// compile-flags: -C no-prepopulate-passes -C panic=abort -C force-unwind-tables=n +// ignore-windows + +#![crate_type="lib"] + +// CHECK-NOT: attributes #{{.*}} uwtable +pub fn foo() {} |
