aboutsummaryrefslogtreecommitdiff
path: root/flang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorKelvin Li <kkwli@users.noreply.github.com>2024-10-29 14:20:11 -0400
committerGitHub <noreply@github.com>2024-10-29 14:20:11 -0400
commit8e14c6c172b122203f46a9ad114d51c74535cbb7 (patch)
treee77b7e46db7503dc4404f50b7a66d2825ee36d2d /flang/lib/Frontend/CompilerInvocation.cpp
parent9e37cbb469c0ec2fdbf4e3e7b0d9a2938ac30b01 (diff)
downloadllvm-8e14c6c172b122203f46a9ad114d51c74535cbb7.zip
llvm-8e14c6c172b122203f46a9ad114d51c74535cbb7.tar.gz
llvm-8e14c6c172b122203f46a9ad114d51c74535cbb7.tar.bz2
[flang] Support -mabi=vec-extabi and -mabi=vec-default on AIX (#113215)
This option is to enable the AIX extended and default vector ABIs.
Diffstat (limited to 'flang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r--flang/lib/Frontend/CompilerInvocation.cpp10
1 files changed, 10 insertions, 0 deletions
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) {