[llvm-commits] [patch] Implement no-canonical-prefixes.

Rafael Espindola espindola at google.com
Wed Dec 2 07:27:14 PST 2009


2009/12/1 Chandler Carruth <chandlerc at google.com>:
> This needs to be updated after Duncan's refactoring of the driver...
> Is it still relevant? Some parts of the driver now explicitly mention
> preserving symlinks.

An updated patch is attached. It is still relevant. For example,
create a symlink Debug2 -> Debug and run:

$ ./Debug2/bin/clang -no-canonical-prefixes -c -v test.c 2>&1 | grep clang-cc
 "./Debug2/bin/clang-cc" -triple x86_64-unknown-linux-gnu -S
-disable-free -main-file-name test.c -mrelocation-model static
-mdisable-fp-elim -munwind-tables -mcpu x86-64 -v -fmessage-length 0
-fgnu-runtime -fdiagnostics-show-option -o /tmp/cc-N0vEJy.s -x c
test.c

$  ./Debug2/bin/clang  -c -v test.c 2>&1 | grep clang-cc
 "/usr/local/google/home/espindola/llvm/build/Debug/bin/clang-cc"
-triple x86_64-unknown-linux-gnu -S -disable-free -main-file-name
test.c -mrelocation-model static -mdisable-fp-elim -munwind-tables
-mcpu x86-64 -v -fmessage-length 0 -fgnu-runtime
-fdiagnostics-show-option -o /tmp/cc-pIwcRJ.s -x c test.c
clang-cc version 1.1 based upon llvm 2.7svn hosted on x86_64-unknown-linux-gnu

Note that with -no-canonical-prefixes we use ./Debug2/bin-clang-cc and
without it we use
/usr/local/google/home/espindola/llvm/build/Debug/bin/clang-cc. I am
not sure why someone would ever want to use the canonical path, but
this behavior is consistent with how gcc finds cc1.

Cheers,
-- 
Rafael Ávila de Espíndola
-------------- next part --------------
A non-text attachment was scrubbed...
Name: no-canonical-prefixes.patch
Type: text/x-diff
Size: 2656 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20091202/581de697/attachment.patch>


More information about the llvm-commits mailing list