From 8e14c6c172b122203f46a9ad114d51c74535cbb7 Mon Sep 17 00:00:00 2001 From: Kelvin Li Date: Tue, 29 Oct 2024 14:20:11 -0400 Subject: [flang] Support -mabi=vec-extabi and -mabi=vec-default on AIX (#113215) This option is to enable the AIX extended and default vector ABIs. --- flang/lib/Frontend/CompilerInvocation.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'flang/lib/Frontend/CompilerInvocation.cpp') diff --git a/flang/lib/Frontend/CompilerInvocation.cpp b/flang/lib/Frontend/CompilerInvocation.cpp index 94d3d11..1214a2e 100644 --- a/flang/lib/Frontend/CompilerInvocation.cpp +++ b/flang/lib/Frontend/CompilerInvocation.cpp @@ -457,6 +457,16 @@ static void parseTargetArgs(TargetOptions &opts, llvm::opt::ArgList &args) { if (args.hasArg(clang::driver::options::OPT_fdisable_integer_16)) opts.disabledIntegerKinds.push_back(16); + + if (const llvm::opt::Arg *a = + args.getLastArg(clang::driver::options::OPT_mabi_EQ)) { + llvm::StringRef V = a->getValue(); + if (V == "vec-extabi") { + opts.EnableAIXExtendedAltivecABI = true; + } else if (V == "vec-default") { + opts.EnableAIXExtendedAltivecABI = false; + } + } } // Tweak the frontend configuration based on the frontend action static void setUpFrontendBasedOnAction(FrontendOptions &opts) { -- cgit v1.1