ARM: Add -m[no-]crc to dis/enable CRC subtargetfeature from clang
Allow users to disable or enable CRC subtarget feature.
Differential Revision: http://llvm-reviews.chandlerc.com/D2037
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193600 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp
index 397f641..ffaac21 100644
--- a/lib/Driver/Tools.cpp
+++ b/lib/Driver/Tools.cpp
@@ -773,6 +773,15 @@
// implementation, although the same isn't true of VFP or VFP3.
if (FloatABI == "soft")
Features.push_back("-neon");
+
+ // En/disable crc
+ if (Arg *A = Args.getLastArg(options::OPT_mcrc,
+ options::OPT_mnocrc)) {
+ if (A->getOption().matches(options::OPT_mcrc))
+ Features.push_back("+crc");
+ else
+ Features.push_back("-crc");
+ }
}
void Clang::AddARMTargetArgs(const ArgList &Args,