Skip to content

Commit f3ada49

Browse files
committed
---
yaml --- r: 5717 b: refs/heads/master c: 4b58071 h: refs/heads/master i: 5715: 21feca0 v: v3
1 parent b2b1aeb commit f3ada49

File tree

4 files changed

+25
-6
lines changed

4 files changed

+25
-6
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: a1e4ab3e38209b3521968d21394dda28ade7d9c4
2+
refs/heads/master: 4b58071f96821f43e5124d46b65f4e777992415f

trunk/mk/platform.mk

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -105,10 +105,9 @@ ifdef CFG_UNIXY
105105
CFG_PATH_MUNGE := true
106106
CFG_EXE_SUFFIX :=
107107
CFG_LDPATH :=
108-
CFG_RUN=$(CFG_LDENV)=$(1) $(2)
109-
CFG_RUN_TARG=$(call CFG_RUN,$(CFG_BUILD_DIR)/$(HOST_LIB$(1)),$(2))
110-
CFG_RUN_TEST=$(call CFG_RUN,$(call CFG_TESTLIB,$(1)),\
111-
$(CFG_VALGRIND) $(1))
108+
CFG_RUN=$(2)
109+
CFG_RUN_TARG=$(call CFG_RUN,,$(2))
110+
CFG_RUN_TEST=$(call CFG_RUN,,$(CFG_VALGRIND) $(1))
112111
CFG_LIBUV_LINK_FLAGS=-lpthread
113112

114113
ifdef CFG_ENABLE_MINGW_CROSS

trunk/src/compiletest/procsrv.rs

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ fn worker(p: port<request>) {
131131
let spawnproc =
132132
bind run::spawn_process(execparms.prog, execparms.args,
133133
pipe_in.in, pipe_out.out, pipe_err.out);
134-
let pid = with_lib_path(execparms.lib_path, spawnproc);
134+
let pid = maybe_with_lib_path(execparms.lib_path, spawnproc);
135135

136136
os::libc::close(pipe_in.in);
137137
os::libc::close(pipe_out.out);
@@ -151,6 +151,18 @@ fn worker(p: port<request>) {
151151
}
152152
}
153153

154+
// Only windows needs to set the library path
155+
#[cfg(target_os = "win32")]
156+
fn maybe_with_lib_path<@T>(path: str, f: fn() -> T) -> T {
157+
with_lib_path(path, f)
158+
}
159+
160+
#[cfg(target_os = "linux")]
161+
#[cfg(target_os = "macos")]
162+
fn maybe_with_lib_path<@T>(_path: str, f: fn() -> T) -> T {
163+
f()
164+
}
165+
154166
fn with_lib_path<@T>(path: str, f: fn() -> T) -> T {
155167
let maybe_oldpath = getenv(util::lib_path_env_var());
156168
append_lib_path(path);

trunk/src/compiletest/runtest.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -310,6 +310,14 @@ fn program_output(cx: cx, testfile: str, lib_path: str, prog: str,
310310
cmdline: cmdline};
311311
}
312312

313+
// Linux and mac don't require adjusting the library search path
314+
#[cfg(target_os = "linux")]
315+
#[cfg(target_os = "macos")]
316+
fn make_cmdline(_libpath: str, prog: str, args: [str]) -> str {
317+
#fmt["%s %s", prog, str::connect(args, " ")]
318+
}
319+
320+
#[cfg(target_os = "win32")]
313321
fn make_cmdline(libpath: str, prog: str, args: [str]) -> str {
314322
#fmt["%s %s %s", lib_path_cmd_prefix(libpath), prog,
315323
str::connect(args, " ")]

0 commit comments

Comments
 (0)