Tweak and add test for detecting libraries with mismatching target triples.
Closes #10814.
This commit is contained in:
parent
830c82dd74
commit
ceff2ca1fc
4 changed files with 38 additions and 7 deletions
11
src/test/run-make/mismatching-target-triples/Makefile
Normal file
11
src/test/run-make/mismatching-target-triples/Makefile
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
-include ../tools.mk
|
||||
|
||||
# Issue #10814
|
||||
#
|
||||
# these are no_std to avoid having to have the standard library or any
|
||||
# linkers/assemblers for the relevant platform
|
||||
|
||||
all:
|
||||
$(RUSTC) foo.rs --target=i686-unknown-linux-gnu
|
||||
$(RUSTC) bar.rs --target=x86_64-unknown-linux-gnu 2>&1 \
|
||||
| grep "couldn't find crate .foo. with expected target triple x86_64-unknown-linux-gnu"
|
||||
11
src/test/run-make/mismatching-target-triples/bar.rs
Executable file
11
src/test/run-make/mismatching-target-triples/bar.rs
Executable file
|
|
@ -0,0 +1,11 @@
|
|||
// Copyright 2014 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.
|
||||
#![no_std]
|
||||
extern crate foo;
|
||||
11
src/test/run-make/mismatching-target-triples/foo.rs
Executable file
11
src/test/run-make/mismatching-target-triples/foo.rs
Executable file
|
|
@ -0,0 +1,11 @@
|
|||
// Copyright 2014 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.
|
||||
#![no_std]
|
||||
#![crate_type = "lib"]
|
||||
Loading…
Add table
Add a link
Reference in a new issue