diff options
Diffstat (limited to 'clang/lib/Driver/ToolChains/Arch/ARM.cpp')
-rw-r--r-- | clang/lib/Driver/ToolChains/Arch/ARM.cpp | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/clang/lib/Driver/ToolChains/Arch/ARM.cpp b/clang/lib/Driver/ToolChains/Arch/ARM.cpp index 5be8698affc..44c8871d0e1 100644 --- a/clang/lib/Driver/ToolChains/Arch/ARM.cpp +++ b/clang/lib/Driver/ToolChains/Arch/ARM.cpp @@ -391,22 +391,12 @@ void arm::getARMTargetFeatures(const ToolChain &TC, } else if (HDivArg) getARMHWDivFeatures(D, HDivArg, Args, HDivArg->getValue(), Features); - // Setting -msoft-float/-mfloat-abi=soft effectively disables the FPU (GCC - // ignores the -mfpu options in this case). - // Note that the ABI can also be set implicitly by the target selected. + // Setting -msoft-float effectively disables NEON because of the GCC + // implementation, although the same isn't true of VFP or VFP3. if (ABI == arm::FloatABI::Soft) { - llvm::ARM::getFPUFeatures(llvm::ARM::FK_NONE, Features); - - // Disable hardware FP features which have been enabled. - // FIXME: Disabling vfp2 and neon should be enough as all the other - // features are dependant on these 2 features in LLVM. However - // there is currently no easy way to test this in clang, so for - // now just be explicit and disable all known dependent features - // as well. - for (std::string Feature : {"vfp2", "vfp3", "vfp4", "fp-armv8", "fullfp16", - "neon", "crypto", "dotprod"}) - if (std::find(std::begin(Features), std::end(Features), "+" + Feature) != std::end(Features)) - Features.push_back("-" + Feature); + Features.push_back("-neon"); + // Also need to explicitly disable features which imply NEON. + Features.push_back("-crypto"); } // En/disable crc code generation. |