diff options
author | Tim Northover <tnorthover@apple.com> | 2015-10-30 16:30:27 +0000 |
---|---|---|
committer | Tim Northover <tnorthover@apple.com> | 2015-10-30 16:30:27 +0000 |
commit | 6f3ff22e739441cfdcd8ad1de92dba6f48fa3da7 (patch) | |
tree | 0b7bc93334735a6aefa0f859b9f12af7fa19f291 /clang/lib/Driver/Tools.cpp | |
parent | 996345775e0d09221c6e8dc6a01fac1e8ccb9916 (diff) | |
download | llvm-6f3ff22e739441cfdcd8ad1de92dba6f48fa3da7.zip llvm-6f3ff22e739441cfdcd8ad1de92dba6f48fa3da7.tar.gz llvm-6f3ff22e739441cfdcd8ad1de92dba6f48fa3da7.tar.bz2 |
Support watchOS and tvOS driver options
This patch should add support for almost all command-line options and
driver tinkering necessary to produce a correct "clang -cc1"
invocation for watchOS and tvOS.
llvm-svn: 251706
Diffstat (limited to 'clang/lib/Driver/Tools.cpp')
-rw-r--r-- | clang/lib/Driver/Tools.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/clang/lib/Driver/Tools.cpp b/clang/lib/Driver/Tools.cpp index 3e4cb31..29b100e 100644 --- a/clang/lib/Driver/Tools.cpp +++ b/clang/lib/Driver/Tools.cpp @@ -3128,7 +3128,8 @@ ParsePICArgs(const ToolChain &ToolChain, const llvm::Triple &Triple, // This kernel flags are a trump-card: they will disable PIC/PIE // generation, independent of the argument order. - if (KernelOrKext && (!Triple.isiOS() || Triple.isOSVersionLT(6))) + if (KernelOrKext && ((!Triple.isiOS() || Triple.isOSVersionLT(6)) && + !Triple.isWatchOS())) PIC = PIE = false; if (Arg *A = Args.getLastArg(options::OPT_mdynamic_no_pic)) { @@ -6232,7 +6233,11 @@ StringRef arm::getLLVMArchSuffixForARM(StringRef CPU, StringRef Arch, // extract arch from default cpu of the Triple ArchKind = llvm::ARM::parseCPUArch(Triple.getARMCPUForArch(ARMArch)); } else { - ArchKind = llvm::ARM::parseCPUArch(CPU); + // FIXME: horrible hack to get around the fact that Cortex-A7 is only an + // armv7k triple if it's actually been specified via "-arch armv7k". + ArchKind = (Arch == "armv7k" || Arch == "thumbv7k") + ? llvm::ARM::AK_ARMV7K + : llvm::ARM::parseCPUArch(CPU); } if (ArchKind == llvm::ARM::AK_INVALID) return ""; |