ArcsinX added a comment. It seems this patch can break GCC toolchains support
This patch expects that we never get target-related options in `CommandLine` passed to `extractSystemIncludesAndTarget()` for **GCC** toolchain. But seems this is not always true because of https://github.com/llvm/llvm-project/blob/main/clang-tools-extra/clangd/GlobalCompilationDatabase.cpp#L253 In other words, with this patch we preserve `--target=...`, but this option can appear from https://github.com/llvm/llvm-project/blob/main/clang-tools-extra/clangd/GlobalCompilationDatabase.cpp#L253 (but not from `compile_commands.json`). As the result of it, we can call **GCC** toolchain with `--target=..` option at trying to query-driver and this call will fail (because GCC has no --target option) CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138546/new/ https://reviews.llvm.org/D138546 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits