aboutsummaryrefslogtreecommitdiff
path: root/flang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'flang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r--flang/lib/Frontend/CompilerInvocation.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/flang/lib/Frontend/CompilerInvocation.cpp b/flang/lib/Frontend/CompilerInvocation.cpp
index b8f4ad7..e24d816 100644
--- a/flang/lib/Frontend/CompilerInvocation.cpp
+++ b/flang/lib/Frontend/CompilerInvocation.cpp
@@ -171,6 +171,14 @@ static void parseTargetArgs(TargetOptions &opts, llvm::opt::ArgList &args) {
if (const llvm::opt::Arg *a =
args.getLastArg(clang::driver::options::OPT_triple))
opts.triple = a->getValue();
+
+ if (const llvm::opt::Arg *a =
+ args.getLastArg(clang::driver::options::OPT_target_cpu))
+ opts.cpu = a->getValue();
+
+ for (const llvm::opt::Arg *currentArg :
+ args.filtered(clang::driver::options::OPT_target_feature))
+ opts.featuresAsWritten.emplace_back(currentArg->getValue());
}
// Tweak the frontend configuration based on the frontend action