diff options
author | Mike Stump <mrs@apple.com> | 2009-03-27 20:15:22 +0000 |
---|---|---|
committer | Mike Stump <mrs@apple.com> | 2009-03-27 20:15:22 +0000 |
commit | 1c9b7422dceb5ecdc50bad41e7cf4b635bf89c15 (patch) | |
tree | d05aa54a5ce286c86310db71bb5df38a91f69db1 | |
parent | 0cf2b1990c82121d03a004dafe498ba43bf4b42a (diff) |
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
-rw-r--r-- | include/clang/Driver/Options.def | 1 | ||||
-rw-r--r-- | tools/clang-cc/clang.cpp | 4 |
2 files changed, 4 insertions, 1 deletions
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<bool> 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<unsigned> { |