aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Driver/Tools.cpp
diff options
context:
space:
mode:
authorTim Northover <tnorthover@apple.com>2014-11-10 21:17:23 +0000
committerTim Northover <tnorthover@apple.com>2014-11-10 21:17:23 +0000
commit642e770f684eb8b269df0988cff45ce1becff269 (patch)
treecdf9f3760ccdcf3f1ee15f4f309b5a96362f9ec2 /clang/lib/Driver/Tools.cpp
parent99c464c3f377c31824318455789cdd422b3e3a82 (diff)
downloadllvm-642e770f684eb8b269df0988cff45ce1becff269.zip
llvm-642e770f684eb8b269df0988cff45ce1becff269.tar.gz
llvm-642e770f684eb8b269df0988cff45ce1becff269.tar.bz2
AArch64: set all processor features from -arch if nothing else present
Darwin's "-arch arm64" option implies full Cyclone CPU, for both architectural and tuning purposes. So if neither of the explicit options have been given, forward that on to the proper invocation. rdar://problem/18906227 llvm-svn: 221631
Diffstat (limited to 'clang/lib/Driver/Tools.cpp')
-rw-r--r--clang/lib/Driver/Tools.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/lib/Driver/Tools.cpp b/clang/lib/Driver/Tools.cpp
index ca705c1..042d7b1 100644
--- a/clang/lib/Driver/Tools.cpp
+++ b/clang/lib/Driver/Tools.cpp
@@ -1794,6 +1794,9 @@ static void getAArch64TargetFeatures(const Driver &D, const ArgList &Args,
success = getAArch64ArchFeaturesFromMarch(D, A->getValue(), Args, Features);
else if ((A = Args.getLastArg(options::OPT_mcpu_EQ)))
success = getAArch64ArchFeaturesFromMcpu(D, A->getValue(), Args, Features);
+ else if (Args.hasArg(options::OPT_arch))
+ success = getAArch64ArchFeaturesFromMcpu(D, getAArch64TargetCPU(Args), Args,
+ Features);
if (success && (A = Args.getLastArg(options::OPT_mtune_EQ)))
success =
@@ -1801,6 +1804,9 @@ static void getAArch64TargetFeatures(const Driver &D, const ArgList &Args,
else if (success && (A = Args.getLastArg(options::OPT_mcpu_EQ)))
success =
getAArch64MicroArchFeaturesFromMcpu(D, A->getValue(), Args, Features);
+ else if (Args.hasArg(options::OPT_arch))
+ success = getAArch64MicroArchFeaturesFromMcpu(D, getAArch64TargetCPU(Args),
+ Args, Features);
if (!success)
D.Diag(diag::err_drv_clang_unsupported) << A->getAsString(Args);