summaryrefslogtreecommitdiffstats
path: root/clang/lib/Driver
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2011-10-11 18:20:16 +0000
committerDaniel Dunbar <daniel@zuster.org>2011-10-11 18:20:16 +0000
commit0f41eee2a06178a5d766246126dedff978e59ebc (patch)
treee3975a5f852fc778d443d9c29c51b80bbdfb9790 /clang/lib/Driver
parentb25bfde52db2f368fa473727ab5bdeb8d3233f5e (diff)
downloadbcm5719-llvm-0f41eee2a06178a5d766246126dedff978e59ebc.tar.gz
bcm5719-llvm-0f41eee2a06178a5d766246126dedff978e59ebc.zip
Driver: Add support for a new -nostdlibinc option.
- This disables the system include directories, but not the compiler builtin directories. Useful for projects that want to use things like the intrinsic headers, but are otherwise freestanding. - I'm willing to reconsider the option naming, I also considered providing an explicit -builtinc (which would match -nobuiltininc), but this is more consistent with existing options. llvm-svn: 141692
Diffstat (limited to 'clang/lib/Driver')
-rw-r--r--clang/lib/Driver/Tools.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/Driver/Tools.cpp b/clang/lib/Driver/Tools.cpp
index 07d2a681898..e0efe822864 100644
--- a/clang/lib/Driver/Tools.cpp
+++ b/clang/lib/Driver/Tools.cpp
@@ -1486,6 +1486,8 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
CmdArgs.push_back("-nostdsysteminc");
CmdArgs.push_back("-nobuiltininc");
} else {
+ if (Args.hasArg(options::OPT_nostdlibinc))
+ CmdArgs.push_back("-nostdsysteminc");
Args.AddLastArg(CmdArgs, options::OPT_nostdincxx);
Args.AddLastArg(CmdArgs, options::OPT_nobuiltininc);
}
OpenPOWER on IntegriCloud