diff options
| author | Michael Woerister <michaelwoerister@posteo> | 2018-08-03 17:07:38 +0200 |
|---|---|---|
| committer | Michael Woerister <michaelwoerister@posteo> | 2018-08-07 14:44:48 +0200 |
| commit | 386e000c5f28dfac697ae145524bcc1c17759993 (patch) | |
| tree | de6746d7636f4e7fc3633c91cd80e40a7e84c8d0 | |
| parent | 54fba3ac1aa308ecec1bf6b25049c669bbf003c3 (diff) | |
| download | rust-386e000c5f28dfac697ae145524bcc1c17759993.tar.gz rust-386e000c5f28dfac697ae145524bcc1c17759993.zip | |
Add test case for omitting dllimport during cross-lang LTO.
| -rw-r--r-- | src/test/codegen/no-dllimport-w-cross-lang-lto.rs | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/test/codegen/no-dllimport-w-cross-lang-lto.rs b/src/test/codegen/no-dllimport-w-cross-lang-lto.rs new file mode 100644 index 00000000000..025e7cbf179 --- /dev/null +++ b/src/test/codegen/no-dllimport-w-cross-lang-lto.rs @@ -0,0 +1,23 @@ +// Copyright 2018 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or +// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license +// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +// This test makes sure that functions get annotated with the proper +// "target-cpu" attribute in LLVM. + +// no-prefer-dynamic +// only-msvc +// compile-flags: -C no-prepopulate-passes -Z cross-lang-lto + +#![crate_type = "rlib"] + +// CHECK-NOT: @{{.*}}__imp_{{.*}}GLOBAL{{.*}} = global i8* + +pub static GLOBAL: u32 = 0; +pub static mut GLOBAL2: u32 = 0; |
