diff options
author | Daniel Dunbar <daniel@zuster.org> | 2008-08-11 21:35:06 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2008-08-11 21:35:06 +0000 |
commit | f77ac86f4eca528a04b817d7ad7f045a47d52712 (patch) | |
tree | c029884b8ff18e6436d9e322d5062a4a619e5bec /Driver/clang.cpp | |
parent | 709c00cf6e88a1acfe2b27e61c9dc5f7a71e49b9 (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.cpp | 17 |
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> |