auto merge of #14677 : alexcrichton/rust/issue-2665, r=brson

There's no need to distribute these ABI helpers for tests with the standard rust
distribution they're only needed for our tests.

Closes #2665
This commit is contained in:
bors 2014-06-06 10:36:55 -07:00
commit 3744940706
31 changed files with 34 additions and 33 deletions

View File

@ -84,7 +84,7 @@ DEPS_collections := core alloc
DEPS_fourcc := syntax std
DEPS_hexfloat := syntax std
DEPS_num := std
DEPS_test := std getopts serialize term time regex
DEPS_test := std getopts serialize term time regex native:rust_test_helpers
DEPS_time := std serialize sync
DEPS_rand := core
DEPS_url := std

View File

@ -35,7 +35,8 @@
# that's per-target so you're allowed to conditionally add files based on the
# target.
################################################################################
NATIVE_LIBS := rustrt hoedown uv_support morestack miniz context_switch
NATIVE_LIBS := rustrt hoedown uv_support morestack miniz context_switch \
rust_test_helpers
# $(1) is the target triple
define NATIVE_LIBRARIES
@ -53,9 +54,9 @@ NATIVE_DEPS_uv_support_$(1) := rust_uv.c
NATIVE_DEPS_miniz_$(1) = miniz.c
NATIVE_DEPS_rustrt_$(1) := rust_builtin.c \
rust_android_dummy.c \
rust_test_helpers.c \
rust_try.ll \
arch/$$(HOST_$(1))/record_sp.S
NATIVE_DEPS_rust_test_helpers_$(1) := rust_test_helpers.c
NATIVE_DEPS_morestack_$(1) := arch/$$(HOST_$(1))/morestack.S
NATIVE_DEPS_context_switch_$(1) := \
arch/$$(HOST_$(1))/_context.S

View File

@ -12,7 +12,7 @@
extern crate libc;
#[link(name="rustrt")]
#[link(name="rust_test_helpers")]
extern {
pub fn rust_get_test_int() -> libc::intptr_t;
}

View File

@ -16,7 +16,7 @@ extern crate libc;
pub mod rustrt {
extern crate libc;
#[link(name = "rustrt")]
#[link(name = "rust_test_helpers")]
extern {
pub fn rust_dbg_call(cb: extern "C" fn(libc::uintptr_t) -> libc::uintptr_t,
data: libc::uintptr_t)

View File

@ -13,7 +13,7 @@
pub mod rustrt {
extern crate libc;
#[link(name = "rustrt")]
#[link(name = "rust_test_helpers")]
extern {
fn rust_get_test_int() -> libc::intptr_t;
}

View File

@ -10,7 +10,7 @@
extern crate libc;
#[link(name = "rustrt")]
#[link(name = "rust_test_helpers")]
extern {
fn rust_get_test_int() -> libc::intptr_t;
}

View File

@ -11,7 +11,7 @@
mod rustrt {
extern crate libc;
#[link(name = "rustrt")]
#[link(name = "rust_test_helpers")]
extern {
pub fn rust_get_test_int() -> libc::intptr_t;
}

View File

@ -13,7 +13,7 @@ extern crate libc;
mod rustrt {
extern crate libc;
#[link(name = "rustrt")]
#[link(name = "rust_test_helpers")]
extern {
pub fn rust_dbg_call(cb: extern "C" fn(libc::uintptr_t) -> libc::uintptr_t,
data: libc::uintptr_t)

View File

@ -14,7 +14,7 @@ use std::task;
mod rustrt {
extern crate libc;
#[link(name = "rustrt")]
#[link(name = "rust_test_helpers")]
extern {
pub fn rust_dbg_call(cb: extern "C" fn(libc::uintptr_t) -> libc::uintptr_t,
data: libc::uintptr_t)

View File

@ -13,7 +13,7 @@ extern crate libc;
mod rustrt {
extern crate libc;
#[link(name = "rustrt")]
#[link(name = "rust_test_helpers")]
extern {
pub fn rust_dbg_call(cb: extern "C" fn(libc::uintptr_t) -> libc::uintptr_t,
data: libc::uintptr_t)

View File

@ -18,7 +18,7 @@ use std::task;
mod rustrt {
extern crate libc;
#[link(name = "rustrt")]
#[link(name = "rust_test_helpers")]
extern {
pub fn rust_dbg_call(cb: extern "C" fn(libc::uintptr_t) -> libc::uintptr_t,
data: libc::uintptr_t)

View File

@ -16,7 +16,7 @@ struct TwoU16s {
one: u16, two: u16
}
#[link(name = "rustrt")]
#[link(name = "rust_test_helpers")]
extern {
pub fn rust_dbg_extern_identity_TwoU16s(v: TwoU16s) -> TwoU16s;
}

View File

@ -16,7 +16,7 @@ struct TwoU32s {
one: u32, two: u32
}
#[link(name = "rustrt")]
#[link(name = "rust_test_helpers")]
extern {
pub fn rust_dbg_extern_identity_TwoU32s(v: TwoU32s) -> TwoU32s;
}

View File

@ -16,7 +16,7 @@ struct TwoU64s {
one: u64, two: u64
}
#[link(name = "rustrt")]
#[link(name = "rust_test_helpers")]
extern {
pub fn rust_dbg_extern_identity_TwoU64s(v: TwoU64s) -> TwoU64s;
}

View File

@ -16,7 +16,7 @@ struct TwoU8s {
one: u8, two: u8
}
#[link(name = "rustrt")]
#[link(name = "rust_test_helpers")]
extern {
pub fn rust_dbg_extern_identity_TwoU8s(v: TwoU8s) -> TwoU8s;
}

View File

@ -10,7 +10,7 @@
// Test a function that takes/returns a u8.
#[link(name = "rustrt")]
#[link(name = "rust_test_helpers")]
extern {
pub fn rust_dbg_extern_identity_u8(v: u8) -> u8;
}

View File

@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#[link(name = "rustrt")]
#[link(name = "rust_test_helpers")]
extern {
pub fn rust_dbg_extern_identity_double(v: f64) -> f64;
}

View File

@ -26,7 +26,7 @@ struct ManyInts {
struct Empty;
#[link(name = "rustrt")]
#[link(name = "rust_test_helpers")]
extern {
fn rust_dbg_extern_empty_struct(v1: ManyInts, e: Empty, v2: ManyInts);
}

View File

@ -10,7 +10,7 @@
// Test a function that takes/returns a u32.
#[link(name = "rustrt")]
#[link(name = "rust_test_helpers")]
extern {
pub fn rust_dbg_extern_identity_u32(v: u32) -> u32;
}

View File

@ -10,7 +10,7 @@
// Test a call to a function that takes/returns a u64.
#[link(name = "rustrt")]
#[link(name = "rust_test_helpers")]
extern {
pub fn rust_dbg_extern_identity_u64(v: u64) -> u64;
}

View File

@ -12,7 +12,7 @@ struct TwoU16s {
one: u16, two: u16
}
#[link(name = "rustrt")]
#[link(name = "rust_test_helpers")]
extern {
pub fn rust_dbg_extern_return_TwoU16s() -> TwoU16s;
}

View File

@ -12,7 +12,7 @@ struct TwoU32s {
one: u32, two: u32
}
#[link(name = "rustrt")]
#[link(name = "rust_test_helpers")]
extern {
pub fn rust_dbg_extern_return_TwoU32s() -> TwoU32s;
}

View File

@ -12,7 +12,7 @@ struct TwoU64s {
one: u64, two: u64
}
#[link(name = "rustrt")]
#[link(name = "rust_test_helpers")]
extern {
pub fn rust_dbg_extern_return_TwoU64s() -> TwoU64s;
}

View File

@ -12,7 +12,7 @@ struct TwoU8s {
one: u8, two: u8
}
#[link(name = "rustrt")]
#[link(name = "rust_test_helpers")]
extern {
pub fn rust_dbg_extern_return_TwoU8s() -> TwoU8s;
}

View File

@ -17,7 +17,7 @@ use std::task;
mod rustrt {
extern crate libc;
#[link(name = "rustrt")]
#[link(name = "rust_test_helpers")]
extern {
pub fn rust_dbg_call(cb: extern "C" fn(libc::uintptr_t) -> libc::uintptr_t,
data: libc::uintptr_t)

View File

@ -14,7 +14,7 @@ use std::task;
mod rustrt {
extern crate libc;
#[link(name = "rustrt")]
#[link(name = "rust_test_helpers")]
extern {
pub fn rust_dbg_call(cb: extern "C" fn (libc::uintptr_t) -> libc::uintptr_t,
data: libc::uintptr_t)

View File

@ -13,7 +13,7 @@ extern crate libc;
use std::mem;
use std::rt::thread::Thread;
#[link(name = "rustrt")]
#[link(name = "rust_test_helpers")]
extern {
fn rust_dbg_call(cb: extern "C" fn(libc::uintptr_t),
data: libc::uintptr_t) -> libc::uintptr_t;

View File

@ -13,7 +13,7 @@
mod rustrt1 {
extern crate libc;
#[link(name = "rustrt")]
#[link(name = "rust_test_helpers")]
extern {
pub fn rust_get_test_int() -> libc::intptr_t;
}
@ -22,7 +22,7 @@ mod rustrt1 {
mod rustrt2 {
extern crate libc;
#[link(name = "rustrt")]
#[link(name = "rust_test_helpers")]
extern {
pub fn rust_get_test_int() -> libc::intptr_t;
}

View File

@ -13,7 +13,7 @@
mod rustrt {
extern crate libc;
#[link(name = "rustrt")]
#[link(name = "rust_test_helpers")]
extern {
pub fn rust_get_test_int() -> libc::intptr_t;
}

View File

@ -14,7 +14,7 @@
extern crate libc;
#[link(name = "rustrt")]
#[link(name = "rust_test_helpers")]
extern {
static mut rust_dbg_static_mut: libc::c_int;
pub fn rust_dbg_static_mut_check_four();

View File

@ -14,7 +14,7 @@ pub struct Floats { a: f64, b: u8, c: f64 }
mod rustrt {
use super::{Floats, Quad};
#[link(name = "rustrt")]
#[link(name = "rust_test_helpers")]
extern {
pub fn rust_dbg_abi_1(q: Quad) -> Quad;
pub fn rust_dbg_abi_2(f: Floats) -> Floats;