Skip to content

Commit

Permalink
workcache: Don't assume gcc exists on all platforms
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
alexcrichton committed Apr 16, 2014
1 parent 06edc6a commit 4a827f5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/libworkcache/lib.rs
Expand Up @@ -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();

Expand Down

0 comments on commit 4a827f5

Please sign in to comment.