diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2014-04-15 18:25:38 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2014-04-15 19:47:03 -0700 |
| commit | 4a827f588e972668c122f70790ee45e4b3660ace (patch) | |
| tree | ce718fa41491c4ef81a1099671a3fbdb6718c3d4 /src/libworkcache | |
| parent | 06edc6a3b6ba23832530e6c0d4727cbcdcfb8a0d (diff) | |
| download | rust-4a827f588e972668c122f70790ee45e4b3660ace.tar.gz rust-4a827f588e972668c122f70790ee45e4b3660ace.zip | |
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.
Diffstat (limited to 'src/libworkcache')
| -rw-r--r-- | src/libworkcache/lib.rs | 3 |
1 files changed, 2 insertions, 1 deletions
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(); |
