[llvm-commits] [patch] Try to find clang if gcc is not found

Marc-Antoine Ruel maruel at google.com
Mon Oct 31 09:01:46 PDT 2011


Note that I initially attached the diff to a bug at
http://llvm.org/bugs/show_bug.cgi?id=11278 but a colleague recommended to
me to send it to this list;

---

Try to find clang if gcc is not found

Repro:
- On a system without gcc installed (like Windows):
- Build llvm+clang with MSVS2010. I used MinSizeRel configuration but it
shouldn't matter.
- Add ...\build\bin\MinSizeRel to PATH to make sure all llvm tools and clang
are in PATH.
- echo int main() { return 0; } > hello.c
- clang -c hello.c -emit-llvm -o hello.bc
- llc -filetype=obj hello.bc
- llvm-ld hello.obj -o=hello.ld.exe -native

Result:
llvm-ld: Failed to find gcc

Expected:
Uses clang.

Notes:
I kept the behavior to try to find gcc first and only fallback to clang if
gcc
is not found to reduce the side-effects of this patch.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20111031/403fd241/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: find_clang.diff
Type: application/octet-stream
Size: 4885 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20111031/403fd241/attachment.obj>


More information about the llvm-commits mailing list