diff options
author | Alexandros Lamprineas <alexandros.lamprineas@arm.com> | 2019-07-14 18:32:42 +0000 |
---|---|---|
committer | Alexandros Lamprineas <alexandros.lamprineas@arm.com> | 2019-07-14 18:32:42 +0000 |
commit | 54ed9d692456b4dd2eb4cfe37debef897caeed14 (patch) | |
tree | 863d47bc81bfe85bd389801ce3c7b74741f4331c /lib/Driver/ToolChains/Arch | |
parent | d68805d6a72b3cf9bdd4276069bcbaa6fd65fdb3 (diff) | |
download | clang-54ed9d692456b4dd2eb4cfe37debef897caeed14.tar.gz |
[clang][Driver][ARM] Favor -mfpu over default CPU features
When processing the command line options march, mcpu and mfpu, we store
the implied target features on a vector. The change D62998 introduced a
temporary vector, where the processed features get accumulated. When
calling DecodeARMFeaturesFromCPU, which sets the default features for
the specified CPU, we certainly don't want to override the features
that have been explicitly specified on the command line. Therefore, the
default features should appear first in the final vector. This problem
became evident once I added the missing (unhandled) target features in
ARM::getExtensionFeatures.
Differential Revision: https://reviews.llvm.org/D63936
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@366027 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/ToolChains/Arch')
-rw-r--r-- | lib/Driver/ToolChains/Arch/ARM.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/Driver/ToolChains/Arch/ARM.cpp b/lib/Driver/ToolChains/Arch/ARM.cpp index 2e7562c6ee..d1db583e52 100644 --- a/lib/Driver/ToolChains/Arch/ARM.cpp +++ b/lib/Driver/ToolChains/Arch/ARM.cpp @@ -376,7 +376,11 @@ void arm::getARMTargetFeatures(const ToolChain &TC, Features.push_back( Args.MakeArgString((F.second ? "+" : "-") + F.first())); } else if (!CPUName.empty()) { - DecodeARMFeaturesFromCPU(D, CPUName, ExtensionFeatures); + // This sets the default features for the specified CPU. We certainly don't + // want to override the features that have been explicitly specified on the + // command line. Therefore, process them directly instead of appending them + // at the end later. + DecodeARMFeaturesFromCPU(D, CPUName, Features); } if (CPUArg) |