llvmc searches PATH for llc

Hi,

Is it intended that llvmc should search PATH for llc? For example, this
means that llvmc 2.7 can invoke llc 2.8:

  % echo $PATH
  /home/jdenny/installs/llvm/2.8/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
  % /home/jdenny/installs/llvm/2.7/bin/llvmc test.ll
  llc: Unknown command line argument '-f'. Try: 'llc -help'
  % strace -f /home/jdenny/installs/llvm/2.7/bin/llvmc test.ll |& grep exec | grep llc
  [pid 15282] execve("/home/jdenny/installs/llvm/2.8/bin/llc", ["llc", "-f", "-O2", "test.ll", "-o", "/tmp/llvm_z9Haur/test.s"], [/* 41 vars */]) = 0
  % PATH=/home/jdenny/installs/llvm/2.7/bin:$PATH
  % /home/jdenny/installs/llvm/2.7/bin/llvmc test.ll
  % echo $?
  0
  % strace -f /home/jdenny/installs/llvm/2.7/bin/llvmc test.ll |& grep exec | grep llc
  [pid 15309] execve("/home/jdenny/installs/llvm/2.7/bin/llc", ["llc", "-f", "-O2", "test.ll", "-o", "/tmp/llvm_b2iJJw/test.s"], [/* 41 vars */]) = 0

It seems that llvmc should instead invoke the llc from the same LLVM
installation.

Hi,

Joel E. Denny <jdenny <at> etinternational.com> writes:

Hi,

Is it intended that llvmc should search PATH for llc? For example, this
means that llvmc 2.7 can invoke llc 2.8:
[...]

This is fixed in 2.8+ - llvmc now searches the directory it resides in first.

Hi Mikhail,

Hi,

Yep, thanks.