From: Nico Weber Date: Tue, 16 Feb 2016 19:05:50 +0000 (+0000) Subject: clang-cl: Expose -isystem. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e9d15f0df2ca67b7b57387f30bda4da204adb0a3;p=clang clang-cl: Expose -isystem. Like cl.exe, clang-cl allows adding system include directories via the INCLUDE env var. Having a driver flag for this functionality is useful, so add this too. (In the future, we probably also want to have a flag alternative to VCINSTALLDIR as used in MSVCToolChain::getVisualStudioBinaries(), and a way to override the registry accesses in MSVCToolChain::getWindowsSDKDir() -- maybe -ivcroot= and -iwinsdkroot=?). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@260990 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/Driver/Options.td b/include/clang/Driver/Options.td index 0b7bb8ab5e..2f691c385c 100644 --- a/include/clang/Driver/Options.td +++ b/include/clang/Driver/Options.td @@ -1229,7 +1229,8 @@ def iquote : JoinedOrSeparate<["-"], "iquote">, Group, Flags<[CC1 HelpText<"Add directory to QUOTE include search path">, MetaVarName<"">; def isysroot : JoinedOrSeparate<["-"], "isysroot">, Group, Flags<[CC1Option]>, HelpText<"Set the system root directory (usually /)">, MetaVarName<"">; -def isystem : JoinedOrSeparate<["-"], "isystem">, Group, Flags<[CC1Option]>, +def isystem : JoinedOrSeparate<["-"], "isystem">, Group, + Flags<[CC1Option, CoreOption]>, HelpText<"Add directory to SYSTEM include search path">, MetaVarName<"">; def iwithprefixbefore : JoinedOrSeparate<["-"], "iwithprefixbefore">, Group, HelpText<"Set directory to include search path with prefix">, MetaVarName<"">, diff --git a/test/Driver/cl-options.c b/test/Driver/cl-options.c index 5743044a38..f624e777d2 100644 --- a/test/Driver/cl-options.c +++ b/test/Driver/cl-options.c @@ -437,6 +437,7 @@ // RUN: -fno-ms-compatibility \ // RUN: -fms-extensions \ // RUN: -fno-ms-extensions \ +// RUN: -isystem=some/path \ // RUN: -mllvm -disable-llvm-optzns \ // RUN: -Wunused-variable \ // RUN: -fmacro-backtrace-limit=0 \