[clangd] Respect `--sysroot` argument if it is set
authorDavid Goldman <davg@google.com>
Wed, 8 Jan 2020 22:01:59 +0000 (17:01 -0500)
committerDavid Goldman <davg@google.com>
Thu, 9 Jan 2020 16:02:58 +0000 (11:02 -0500)
commitea9888b8f6f20887647b77ebf5864d647fd2ea44
tree1a2e779827f451c200ad8c90c1633930f2e20065
parentfb76c7934dce2ede7e04097edb455eba58f6ebfd
[clangd] Respect `--sysroot` argument if it is set

Summary:
- Since `--sysroot` is a superset of the `-isysroot` argument, we
  shouldn't add the `-isysroot` if we detect a `--sysroot` flag.

Reviewers: sammccall

Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, usaxena95, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D72415
clang-tools-extra/clangd/CompileCommands.cpp