diff options
Diffstat (limited to 'lib/Driver/ToolChain.cpp')
-rw-r--r-- | lib/Driver/ToolChain.cpp | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/lib/Driver/ToolChain.cpp b/lib/Driver/ToolChain.cpp index e305683..d919915 100644 --- a/lib/Driver/ToolChain.cpp +++ b/lib/Driver/ToolChain.cpp @@ -47,7 +47,7 @@ bool ToolChain::HasNativeLLVMSupport() const { return false; } -/// getARMTargetCPU - Get the (LLVM) name of the ARM cpu we are targetting. +/// getARMTargetCPU - Get the (LLVM) name of the ARM cpu we are targeting. // // FIXME: tblgen this. static const char *getARMTargetCPU(const ArgList &Args, @@ -101,6 +101,8 @@ static const char *getARMTargetCPU(const ArgList &Args, return "iwmmxt"; if (MArch == "xscale") return "xscale"; + if (MArch == "armv6m" || MArch == "armv6-m") + return "cortex-m0"; // If all else failed, return the most base CPU LLVM supports. return "arm7tdmi"; @@ -137,6 +139,12 @@ static const char *getLLVMArchSuffixForARM(llvm::StringRef CPU) { if (CPU == "cortex-a8" || CPU == "cortex-a9") return "v7"; + if (CPU == "cortex-m3") + return "v7m"; + + if (CPU == "cortex-m0") + return "v6m"; + return ""; } @@ -168,10 +176,10 @@ std::string ToolChain::ComputeLLVMTriple(const ArgList &Args) const { } std::string ToolChain::ComputeEffectiveClangTriple(const ArgList &Args) const { - // Diagnose use of -mmacosx-version-min and -miphoneos-version-min on - // non-Darwin. + // Diagnose use of Darwin OS deployment target arguments on non-Darwin. if (Arg *A = Args.getLastArg(options::OPT_mmacosx_version_min_EQ, - options::OPT_miphoneos_version_min_EQ)) + options::OPT_miphoneos_version_min_EQ, + options::OPT_mios_simulator_version_min_EQ)) getDriver().Diag(clang::diag::err_drv_clang_unsupported) << A->getAsString(Args); |