aboutsummaryrefslogtreecommitdiff
path: root/Driver/clang.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2008-08-11 21:35:06 +0000
committerDaniel Dunbar <daniel@zuster.org>2008-08-11 21:35:06 +0000
commitf77ac86f4eca528a04b817d7ad7f045a47d52712 (patch)
treec029884b8ff18e6436d9e322d5062a4a619e5bec /Driver/clang.cpp
parent709c00cf6e88a1acfe2b27e61c9dc5f7a71e49b9 (diff)
Add LangOptions::NeXTRuntime.
- Wired to -fnext-runtime and -fgnu-runtime options. - Defaults to GNU, no autoselection for NeXT. Emit NeXT OBJC_IMAGE_INFO marker. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54651 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'Driver/clang.cpp')
-rw-r--r--Driver/clang.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/Driver/clang.cpp b/Driver/clang.cpp
index c55aa17eb2..089faf1255 100644
--- a/Driver/clang.cpp
+++ b/Driver/clang.cpp
@@ -373,6 +373,14 @@ static llvm::cl::opt<bool>
Exceptions("fexceptions",
llvm::cl::desc("Enable support for exception handling."));
+static llvm::cl::opt<bool>
+GNURuntime("fgnu-runtime",
+ llvm::cl::desc("Generate output compatible with the standard GNU Objective-C runtime."));
+
+static llvm::cl::opt<bool>
+NeXTRuntime("fnext-runtime",
+ llvm::cl::desc("Generate output compatible with the NeXT runtime."));
+
// FIXME: add:
// -ansi
// -trigraphs
@@ -439,6 +447,15 @@ static void InitializeLanguageStandard(LangOptions &Options, LangKind LK) {
Options.WritableStrings = WritableStrings;
Options.LaxVectorConversions = LaxVectorConversions;
Options.Exceptions = Exceptions;
+
+ if (NeXTRuntime) {
+ Options.NeXTRuntime = 1;
+ } else if (GNURuntime) {
+ Options.NeXTRuntime = 0;
+ } else {
+ // FIXME: Should autoselect based on platform.
+ Options.NeXTRuntime = 0;
+ }
}
static llvm::cl::opt<bool>