Don't use sysroot/include when sysroot is empty.
authorHafiz Abid Qadeer <abidh@codesourcery.com>
Fri, 4 Dec 2020 17:45:04 +0000 (17:45 +0000)
committerHafiz Abid Qadeer <abidh@codesourcery.com>
Fri, 4 Dec 2020 18:33:24 +0000 (18:33 +0000)
commitca2888310b245d0532d989685a090ae373ee3f93
treea5acd18ccf47a4dd42a89b0baa69e037ea9d85ae
parente60f2cbd0cd8db134e998ba3764cfe59951b4b1d
Don't use sysroot/include when sysroot is empty.

Baremetal toolchain add Driver.SysRoot/include to the system include
paths without checking if Driver.SysRoot is empty. This resulted in
"-internal-isystem" "include" in the command. This patch adds check for
empty sysroot.

Reviewed By: jroelofs

Differential Revision: https://reviews.llvm.org/D92176
clang/lib/Driver/ToolChains/BareMetal.cpp
clang/test/Driver/baremetal.cpp