commit
cc403b6c33
6 changed files with 90 additions and 35 deletions
|
|
@ -1 +1 @@
|
|||
Subproject commit 58ab642c30d9f97735d5745b5d01781ee199c6ae
|
||||
Subproject commit 93d0384373750b52996fd7f8249adaae39f562d8
|
||||
17
src/test/run-make/compiler-rt-works-on-mingw/Makefile
Normal file
17
src/test/run-make/compiler-rt-works-on-mingw/Makefile
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
-include ../tools.mk
|
||||
|
||||
ifneq (,$(findstring MINGW,$(UNAME)))
|
||||
ifndef IS_MSVC
|
||||
all:
|
||||
g++ foo.cpp -c -o $(TMPDIR)/foo.o
|
||||
ar crus $(TMPDIR)/libfoo.a $(TMPDIR)/foo.o
|
||||
$(RUSTC) foo.rs -lfoo -lstdc++
|
||||
$(call RUN,foo)
|
||||
else
|
||||
all:
|
||||
|
||||
endif
|
||||
else
|
||||
all:
|
||||
|
||||
endif
|
||||
5
src/test/run-make/compiler-rt-works-on-mingw/foo.cpp
Normal file
5
src/test/run-make/compiler-rt-works-on-mingw/foo.cpp
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
// ignore-license
|
||||
extern "C" void foo() {
|
||||
int *a = new int(3);
|
||||
delete a;
|
||||
}
|
||||
16
src/test/run-make/compiler-rt-works-on-mingw/foo.rs
Normal file
16
src/test/run-make/compiler-rt-works-on-mingw/foo.rs
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
// Copyright 2015 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.
|
||||
|
||||
extern { fn foo(); }
|
||||
|
||||
pub fn main() {
|
||||
unsafe { foo(); }
|
||||
assert_eq!(7f32.powi(3), 343f32);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue