Open
Description
Hi,
when attempting to use the -print-runtime-dir
switch with the compiler driver, this shows a directory that doesn't exist:
$ stat $(clang -print-runtime-dir)
stat: cannot statx '/usr/lib/llvm-20/lib/clang/20/lib/x86_64-pc-linux-gnu': No such file or directory
I have versions 18, 19 and 20 installed in parallel from apt.llvm.org and iterating over these versions I get:
$ for((i=18;i<21;i++)); do command ls -d $(clang-$i -print-runtime-dir); done
/usr/lib/llvm-18/lib/clang/18/lib/linux
ls: cannot access '/usr/lib/llvm-19/lib/clang/19/lib/x86_64-pc-linux-gnu': No such file or directory
ls: cannot access '/usr/lib/llvm-20/lib/clang/20/lib/x86_64-pc-linux-gnu': No such file or directory
As you can see it works in Clang 18!
Corresponding --version
output:
$ for((i=18;i<21;i++)); do clang-$i --version|head -n 1; done
Ubuntu clang version 18.1.8 (++20240731025043+3b5b5c1ec4a3-1~exp1~20240731145144.92)
Ubuntu clang version 19.1.7 (++20250114103332+cd708029e0b2-1~exp1~20250114103446.78)
Ubuntu clang version 20.1.7 (++20250612073421+199e02a36433-1~exp1~20250612193439.130)