[compiler-rt] [compiler-rt][test] Remove noisy warnings (PR #191510)
Dan Liew via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 22 11:57:16 PDT 2026
delcypher wrote:
> > > > `find_compiler_libdir` => `get_path_from_clang` => uses `--target={config.target_triple}` when asking for the runtimes path. Shouldn't clang be returning the i386 path?
> > >
> > >
> > > But this point is interesting
> >
> >
> > get_path_from_clang is always called target_triple --target=x86_64-unknown-linux-gnu
>
> Actually it's called
>
> usr/local/google/home/vitalybuka/src/llvm.git/out/z/./bin/clang', '--target=x86_64-unknown-linux-gnu', '-m64', '-print-runtime-dir' -> lib/clang/23/lib/x86_64-unknown-linux-gnu
>
> or
>
> usr/local/google/home/vitalybuka/src/llvm.git/out/z/./bin/clang', '--target=x86_64-unknown-linux-gnu', '-m32', '-print-runtime-dir' -> lib/clang/23/lib/i386-unknown-linux-gnu
>
> and when we see warning its
>
> usr/local/google/home/vitalybuka/src/llvm.git/out/z/./bin/clang', '--target=x86_64-unknown-linux-gnu' '-print-runtime-dir' -> lib/clang/23/lib/x86_64-unknown-linux-gnu
So `find_compiler_libdir` is also supported to use `config.target_cflags` too. Does that not contain `-m32`?
```
def find_compiler_libdir():
"""
Returns the path to library resource directory used
by the compiler.
"""
<snip>
# Try using `-print-runtime-dir`. This is only supported by very new versions of Clang.
# so allow failure here.
runtime_dir, clang_cmd = get_path_from_clang(
shlex.split(config.target_cflags) + ["-print-runtime-dir"], allow_failure=True
)
```
```
https://github.com/llvm/llvm-project/pull/191510
More information about the llvm-commits
mailing list