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.cpp17
1 files changed, 14 insertions, 3 deletions
diff --git a/flang/lib/Frontend/CompilerInvocation.cpp b/flang/lib/Frontend/CompilerInvocation.cpp
index 9e42fcc..90c3275 100644
--- a/flang/lib/Frontend/CompilerInvocation.cpp
+++ b/flang/lib/Frontend/CompilerInvocation.cpp
@@ -438,8 +438,19 @@ static void parseTargetArgs(TargetOptions &opts, llvm::opt::ArgList &args) {
for (const llvm::opt::Arg *currentArg :
args.filtered(clang::driver::options::OPT_target_feature))
opts.featuresAsWritten.emplace_back(currentArg->getValue());
-}
+ if (args.hasArg(clang::driver::options::OPT_fdisable_real_10))
+ opts.disabledRealKinds.push_back(10);
+
+ if (args.hasArg(clang::driver::options::OPT_fdisable_real_3))
+ opts.disabledRealKinds.push_back(3);
+
+ if (args.hasArg(clang::driver::options::OPT_fdisable_integer_2))
+ opts.disabledIntegerKinds.push_back(2);
+
+ if (args.hasArg(clang::driver::options::OPT_fdisable_integer_16))
+ opts.disabledIntegerKinds.push_back(16);
+}
// Tweak the frontend configuration based on the frontend action
static void setUpFrontendBasedOnAction(FrontendOptions &opts) {
if (opts.programAction == DebugDumpParsingLog)
@@ -1531,8 +1542,8 @@ CompilerInvocation::getSemanticsCtx(
std::string compilerVersion = Fortran::common::getFlangFullVersion();
Fortran::tools::setUpTargetCharacteristics(
- semanticsContext->targetCharacteristics(), targetMachine, compilerVersion,
- allCompilerInvocOpts);
+ semanticsContext->targetCharacteristics(), targetMachine, getTargetOpts(),
+ compilerVersion, allCompilerInvocOpts);
return semanticsContext;
}