10#include "clang/Config/config.h"
13#include "llvm/Option/ArgList.h"
14#include "llvm/TargetParser/Host.h"
22 const ArgList &Args) {
25 if (Args.hasArg(options::OPT_mfloat_abi_EQ))
26 D.Diag(diag::err_drv_unsupported_opt)
27 << Args.getLastArg(options::OPT_mfloat_abi_EQ)->getAsString(Args);
29 if (Arg *A = Args.getLastArg(clang::driver::options::OPT_msoft_float,
30 options::OPT_mhard_float))
31 if (A->getOption().matches(clang::driver::options::OPT_msoft_float))
32 ABI = systemz::FloatABI::Soft;
38 if (
const Arg *A = Args.getLastArg(clang::driver::options::OPT_march_EQ)) {
39 llvm::StringRef CPUName = A->getValue();
41 if (CPUName ==
"native") {
42 std::string CPU = std::string(llvm::sys::getHostCPUName());
43 if (!CPU.empty() && CPU !=
"generic")
49 return std::string(CPUName);
51 return CLANG_SYSTEMZ_DEFAULT_ARCH;
55 std::vector<llvm::StringRef> &Features) {
57 if (Arg *A = Args.getLastArg(options::OPT_mhtm, options::OPT_mno_htm)) {
58 if (A->getOption().matches(options::OPT_mhtm))
59 Features.push_back(
"+transactional-execution");
61 Features.push_back(
"-transactional-execution");
64 if (Arg *A = Args.getLastArg(options::OPT_mvx, options::OPT_mno_vx)) {
65 if (A->getOption().matches(options::OPT_mvx))
66 Features.push_back(
"+vector");
68 Features.push_back(
"-vector");
72 if (FloatABI == systemz::FloatABI::Soft)
73 Features.push_back(
"+soft-float");
75 if (
const Arg *A = Args.getLastArg(options::OPT_munaligned_symbols,
76 options::OPT_mno_unaligned_symbols)) {
77 if (A->getOption().matches(options::OPT_munaligned_symbols))
78 Features.push_back(
"+unaligned-symbols");
80 Features.push_back(
"-unaligned-symbols");
Driver - Encapsulate logic for constructing compilation processes from a set of gcc-driver-like comma...
The JSON file list parser is used to communicate input to InstallAPI.