summaryrefslogtreecommitdiffstats
path: root/src/test/ui/sepcomp/sepcomp-lib-lto.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/sepcomp/sepcomp-lib-lto.rs')
-rw-r--r--src/test/ui/sepcomp/sepcomp-lib-lto.rs19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/test/ui/sepcomp/sepcomp-lib-lto.rs b/src/test/ui/sepcomp/sepcomp-lib-lto.rs
new file mode 100644
index 000000000..51a572899
--- /dev/null
+++ b/src/test/ui/sepcomp/sepcomp-lib-lto.rs
@@ -0,0 +1,19 @@
+// run-pass
+// Check that we can use `-C lto` when linking against libraries that were
+// separately compiled.
+
+// aux-build:sepcomp_lib.rs
+// compile-flags: -C lto -g
+// ignore-asmjs wasm2js does not support source maps yet
+// no-prefer-dynamic
+
+extern crate sepcomp_lib;
+use sepcomp_lib::a::one;
+use sepcomp_lib::b::two;
+use sepcomp_lib::c::three;
+
+fn main() {
+ assert_eq!(one(), 1);
+ assert_eq!(two(), 2);
+ assert_eq!(three(), 3);
+}