summaryrefslogtreecommitdiffstats
path: root/clang/Driver/clang.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/Driver/clang.cpp')
-rw-r--r--clang/Driver/clang.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/clang/Driver/clang.cpp b/clang/Driver/clang.cpp
index d1ef871d6a1..d0b3dafb318 100644
--- a/clang/Driver/clang.cpp
+++ b/clang/Driver/clang.cpp
@@ -213,9 +213,14 @@ InheritanceViewCls("cxx-inheritance-view",
//===----------------------------------------------------------------------===//
static llvm::cl::opt<bool>
Freestanding("ffreestanding",
- llvm::cl::desc("Assert that the compiler takes place in a "
+ llvm::cl::desc("Assert that the compilation takes place in a "
"freestanding environment"));
+static llvm::cl::opt<bool>
+MathErrno("fmath-errno",
+ llvm::cl::desc("Require math functions to respect errno."),
+ llvm::cl::init(true));
+
//===----------------------------------------------------------------------===//
// Analyzer Options.
//===----------------------------------------------------------------------===//
@@ -647,6 +652,8 @@ static void InitializeLanguageStandard(LangOptions &Options, LangKind LK,
if (Freestanding)
Options.Freestanding = 1;
+ Options.MathErrno = MathErrno;
+
// Override the default runtime if the user requested it.
if (NeXTRuntime)
Options.NeXTRuntime = 1;
@@ -1238,8 +1245,7 @@ static void ParseFile(Preprocessor &PP, MinimalAction *PA) {
//===----------------------------------------------------------------------===//
static llvm::cl::opt<bool>
-OptSize("Os",
- llvm::cl::desc("Optimize for size"));
+OptSize("Os", llvm::cl::desc("Optimize for size"));
// It might be nice to add bounds to the CommandLine library directly.
struct OptLevelParser : public llvm::cl::parser<unsigned> {
OpenPOWER on IntegriCloud