From 4a827f588e972668c122f70790ee45e4b3660ace Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Tue, 15 Apr 2014 18:25:38 -0700 Subject: workcache: Don't assume gcc exists on all platforms FreeBSD has recently moved to clang by default, and no longer ship gcc. Instead use "cc" on unix platforms (the default compiler) and "gcc" on windows. --- src/libworkcache/lib.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/libworkcache') diff --git a/src/libworkcache/lib.rs b/src/libworkcache/lib.rs index 623488ac612..7dd2d945c26 100644 --- a/src/libworkcache/lib.rs +++ b/src/libworkcache/lib.rs @@ -512,8 +512,9 @@ fn test() { prep.declare_input("file", pth.as_str().unwrap(), file_content); prep.exec(proc(_exe) { let out = make_path(~"foo.o"); + let compiler = if cfg!(windows) {"gcc"} else {"cc"}; // FIXME (#9639): This needs to handle non-utf8 paths - Process::status("gcc", [pth.as_str().unwrap().to_owned(), + Process::status(compiler, [pth.as_str().unwrap().to_owned(), ~"-o", out.as_str().unwrap().to_owned()]).unwrap(); -- cgit 1.4.1-3-g733a5