[clang] [Clang][Hexagon] Use --cstdlib flag to choose Picolibc (PR #183257)
via cfe-commits
cfe-commits at lists.llvm.org
Thu Mar 5 01:00:31 PST 2026
quic-k wrote:
@androm3da @quic-akaryaki
### should we normalize the triple or pass on whatever user passed, before adding it in library search path?
most of the toolchains use normalized triples
but not normalizing the triple can maybe help simplify switching C library, when we have clang prefix
if we normalize the triple, the user has to specify triple and cstdlib
`hexagon-clang --target=hexagon-none-elf --cstdlib=picolibc a.c`
library search path added will be `-L /path/to/toolchain/Tools/target/picolibc/hexagon-unknown-none-elf/lib/<hexagon-version>`
or
`hexagon-clang --target=hexagon-h2-elf --cstdlib=picolibc a.c`
library search path added will be `-L /path/to/toolchain/Tools/target/picolibc/hexagon-unknown-h2-elf/lib/<hexagon-version>`
if we don't normalize the triple, the user won't have to specify triple (clang prefix is picked up by driver)
`hexagon-clang --cstdlib=picolibc a.c`
library search path added will be `-L /path/to/toolchain/Tools/target/picolibc/hexagon/lib/<hexagon-version>`
or
`hexagon-h2-clang --cstdlib=picolibc a.c`
library search path added will be `-L /path/to/toolchain/Tools/target/picolibc/hexagon-h2/lib/<hexagon-version>`
https://github.com/llvm/llvm-project/pull/183257
More information about the cfe-commits
mailing list