[cfe-dev] Tools, resource dir and toolchains

Kim Gräsman via cfe-dev cfe-dev at lists.llvm.org
Thu Aug 23 04:40:44 PDT 2018


On Wed, Aug 22, 2018 at 11:32 PM Chris Bieneman <chris.bieneman at me.com> wrote:
>
> New versions of clang (I think 6.x and later) have a flag `-print-resource-dir` that can give you the resource directory path
> without needing to do crazy text parsing.

Thanks, that's definitely usable, but we'd still need to make sure we
have the right version of Clang.

But since the Clang version is part of the path emitted by
`-resource-dir`, maybe it's easier to just get it from there.

So as long as it's a reasonable assumption that a matching Clang is on
the path, we can just invoke them and do a best match on the version
part of the resource dir.

- Kim



More information about the cfe-dev mailing list