aboutsummaryrefslogtreecommitdiff
path: root/lib/Driver/Tools.cpp
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
commit92d6d404833468120f9a86fb360691ac60585551 (patch)
treeece0ab51d3ed5e4169bef6920b5ac1e686e98f03 /lib/Driver/Tools.cpp
parenta268fc0f2229eb132ebc8501b140093aeb5516bf (diff)
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141692 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/Tools.cpp')
-rw-r--r--lib/Driver/Tools.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp
index 07d2a68189..e0efe82286 100644
--- a/lib/Driver/Tools.cpp
+++ b/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);
}