From 1c9b7422dceb5ecdc50bad41e7cf4b635bf89c15 Mon Sep 17 00:00:00 2001 From: Mike Stump Date: Fri, 27 Mar 2009 20:15:22 +0000 Subject: [PATCH] Fixup -fcommon and -fno-common to be more gcc compatible. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67863 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/clang/Driver/Options.def | 1 + tools/clang-cc/clang.cpp | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/include/clang/Driver/Options.def b/include/clang/Driver/Options.def index dc1ce15cd5..1c16b333f7 100644 --- a/include/clang/Driver/Options.def +++ b/include/clang/Driver/Options.def @@ -358,6 +358,7 @@ OPTION("-fblocks", fblocks, Flag, clang_f_Group, INVALID, "", 0) OPTION("-fbootclasspath=", fbootclasspath_EQ, Joined, f_Group, INVALID, "", 0) OPTION("-fbuiltin", fbuiltin, Flag, clang_f_Group, INVALID, "", 0) OPTION("-fclasspath=", fclasspath_EQ, Joined, f_Group, INVALID, "", 0) +OPTION("-fcommon", fcommon, Flag, clang_f_Group, INVALID, "", 0) OPTION("-fcompile-resource=", fcompile_resource_EQ, Joined, f_Group, INVALID, "", 0) OPTION("-fconstant-cfstrings", fconstant_cfstrings, Flag, f_Group, INVALID, "", 0) OPTION("-fcreate-profile", fcreate_profile, Flag, f_Group, INVALID, "", 0) diff --git a/tools/clang-cc/clang.cpp b/tools/clang-cc/clang.cpp index 8beecd0d0a..5d3f68dd8e 100644 --- a/tools/clang-cc/clang.cpp +++ b/tools/clang-cc/clang.cpp @@ -1237,7 +1237,9 @@ OptSize("Os", llvm::cl::desc("Optimize for size")); static llvm::cl::opt NoCommon("fno-common", - llvm::cl::desc("Compile common globals like normal definitions")); + llvm::cl::desc("Compile common globals like normal definitions"), + llvm::cl::ValueDisallowed, llvm::cl::AllowInverse, + llvm::cl::ZeroOrMore); // It might be nice to add bounds to the CommandLine library directly. struct OptLevelParser : public llvm::cl::parser { -- 2.50.1