Skip to content

Commit 3744940

Browse files
committed
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
2 parents 124e997 + 5cdc365 commit 3744940

31 files changed

+34
-33
lines changed

mk/crates.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ DEPS_collections := core alloc
8484
DEPS_fourcc := syntax std
8585
DEPS_hexfloat := syntax std
8686
DEPS_num := std
87-
DEPS_test := std getopts serialize term time regex
87+
DEPS_test := std getopts serialize term time regex native:rust_test_helpers
8888
DEPS_time := std serialize sync
8989
DEPS_rand := core
9090
DEPS_url := std

mk/rt.mk

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@
3535
# that's per-target so you're allowed to conditionally add files based on the
3636
# target.
3737
################################################################################
38-
NATIVE_LIBS := rustrt hoedown uv_support morestack miniz context_switch
38+
NATIVE_LIBS := rustrt hoedown uv_support morestack miniz context_switch \
39+
rust_test_helpers
3940

4041
# $(1) is the target triple
4142
define NATIVE_LIBRARIES
@@ -53,9 +54,9 @@ NATIVE_DEPS_uv_support_$(1) := rust_uv.c
5354
NATIVE_DEPS_miniz_$(1) = miniz.c
5455
NATIVE_DEPS_rustrt_$(1) := rust_builtin.c \
5556
rust_android_dummy.c \
56-
rust_test_helpers.c \
5757
rust_try.ll \
5858
arch/$$(HOST_$(1))/record_sp.S
59+
NATIVE_DEPS_rust_test_helpers_$(1) := rust_test_helpers.c
5960
NATIVE_DEPS_morestack_$(1) := arch/$$(HOST_$(1))/morestack.S
6061
NATIVE_DEPS_context_switch_$(1) := \
6162
arch/$$(HOST_$(1))/_context.S

src/test/auxiliary/anon-extern-mod-cross-crate-1.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
extern crate libc;
1414

15-
#[link(name="rustrt")]
15+
#[link(name="rust_test_helpers")]
1616
extern {
1717
pub fn rust_get_test_int() -> libc::intptr_t;
1818
}

src/test/auxiliary/extern-crosscrate-source.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ extern crate libc;
1616
pub mod rustrt {
1717
extern crate libc;
1818

19-
#[link(name = "rustrt")]
19+
#[link(name = "rust_test_helpers")]
2020
extern {
2121
pub fn rust_dbg_call(cb: extern "C" fn(libc::uintptr_t) -> libc::uintptr_t,
2222
data: libc::uintptr_t)

src/test/auxiliary/foreign_lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
pub mod rustrt {
1414
extern crate libc;
1515

16-
#[link(name = "rustrt")]
16+
#[link(name = "rust_test_helpers")]
1717
extern {
1818
fn rust_get_test_int() -> libc::intptr_t;
1919
}

src/test/run-pass/anon-extern-mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
extern crate libc;
1212

13-
#[link(name = "rustrt")]
13+
#[link(name = "rust_test_helpers")]
1414
extern {
1515
fn rust_get_test_int() -> libc::intptr_t;
1616
}

src/test/run-pass/c-stack-as-value.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
mod rustrt {
1212
extern crate libc;
1313

14-
#[link(name = "rustrt")]
14+
#[link(name = "rust_test_helpers")]
1515
extern {
1616
pub fn rust_get_test_int() -> libc::intptr_t;
1717
}

src/test/run-pass/extern-call-deep.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ extern crate libc;
1313
mod rustrt {
1414
extern crate libc;
1515

16-
#[link(name = "rustrt")]
16+
#[link(name = "rust_test_helpers")]
1717
extern {
1818
pub fn rust_dbg_call(cb: extern "C" fn(libc::uintptr_t) -> libc::uintptr_t,
1919
data: libc::uintptr_t)

src/test/run-pass/extern-call-deep2.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ use std::task;
1414
mod rustrt {
1515
extern crate libc;
1616

17-
#[link(name = "rustrt")]
17+
#[link(name = "rust_test_helpers")]
1818
extern {
1919
pub fn rust_dbg_call(cb: extern "C" fn(libc::uintptr_t) -> libc::uintptr_t,
2020
data: libc::uintptr_t)

src/test/run-pass/extern-call-indirect.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ extern crate libc;
1313
mod rustrt {
1414
extern crate libc;
1515

16-
#[link(name = "rustrt")]
16+
#[link(name = "rust_test_helpers")]
1717
extern {
1818
pub fn rust_dbg_call(cb: extern "C" fn(libc::uintptr_t) -> libc::uintptr_t,
1919
data: libc::uintptr_t)

0 commit comments

Comments
 (0)