aboutsummaryrefslogtreecommitdiff
path: root/flang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorJan Leyonberg <jan_sjodin@yahoo.com>2024-06-17 09:31:15 -0400
committerGitHub <noreply@github.com>2024-06-17 09:31:15 -0400
commitb75e7c61ffc4adea0ec5fca63ba3feba845c8303 (patch)
treebf64fd631fdf456357e70fadd5c26f4a262e239e /flang/lib/Frontend/CompilerInvocation.cpp
parent0cfdce854d588876bfca7030be868314e84c0e5b (diff)
downloadllvm-b75e7c61ffc4adea0ec5fca63ba3feba845c8303.zip
llvm-b75e7c61ffc4adea0ec5fca63ba3feba845c8303.tar.gz
llvm-b75e7c61ffc4adea0ec5fca63ba3feba845c8303.tar.bz2
[flang] Add -mlink-builtin-bitcode option to fc1 (#94763)
This patch enables the -mlink-builtin-bitcode flag in fc1 so that bitcode libraries can be linked in. This is needed for OpenMP offloading libraries.
Diffstat (limited to 'flang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r--flang/lib/Frontend/CompilerInvocation.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/flang/lib/Frontend/CompilerInvocation.cpp b/flang/lib/Frontend/CompilerInvocation.cpp
index f64a939..f96d72f 100644
--- a/flang/lib/Frontend/CompilerInvocation.cpp
+++ b/flang/lib/Frontend/CompilerInvocation.cpp
@@ -347,6 +347,11 @@ static void parseCodeGenArgs(Fortran::frontend::CodeGenOptions &opts,
if (auto *a = args.getLastArg(clang::driver::options::OPT_save_temps_EQ))
opts.SaveTempsDir = a->getValue();
+ // -mlink-builtin-bitcode
+ for (auto *a :
+ args.filtered(clang::driver::options::OPT_mlink_builtin_bitcode))
+ opts.BuiltinBCLibs.push_back(a->getValue());
+
// -mrelocation-model option.
if (const llvm::opt::Arg *a =
args.getLastArg(clang::driver::options::OPT_mrelocation_model)) {