From: Nico Weber Date: Tue, 16 Feb 2016 19:05:50 +0000 (+0000) Subject: clang-cl: Expose -isystem. X-Git-Tag: llvmorg-3.9.0-rc1~14011 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8714c125e8a80d6ea99ab1c044a506bbf8d77406;p=platform%2Fupstream%2Fllvm.git 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=?). llvm-svn: 260990 --- diff --git a/clang/include/clang/Driver/Options.td b/clang/include/clang/Driver/Options.td index 0b7bb8a..2f691c385 100644 --- a/clang/include/clang/Driver/Options.td +++ b/clang/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/clang/test/Driver/cl-options.c b/clang/test/Driver/cl-options.c index 5743044..f624e77 100644 --- a/clang/test/Driver/cl-options.c +++ b/clang/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 \