aboutsummaryrefslogtreecommitdiff
path: root/flang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorJan Sjodin <jan_sjodin@yahoo.com>2023-01-20 14:33:22 -0500
committerJan Sjodin <jan_sjodin@yahoo.com>2023-01-31 10:56:45 -0500
commit40d8c0666f19599c16e5345abee371d016409c12 (patch)
treeb6193b866beca6c5354339945c686b0f34e3517a /flang/lib/Frontend/CompilerInvocation.cpp
parent669f4bc558b7a3dec21bf1045bff5f3885838182 (diff)
downloadllvm-40d8c0666f19599c16e5345abee371d016409c12.zip
llvm-40d8c0666f19599c16e5345abee371d016409c12.tar.gz
llvm-40d8c0666f19599c16e5345abee371d016409c12.tar.bz2
[flang][driver] Add support for -embed-offload-object flag in flang
This patch adds support for the -embed-offload-object flag to embed offloading binaries in host code. This flag is identical to the clang flag with the same name. Differential Revision: https://reviews.llvm.org/D142244 Reviewed By: awarzynski, jhuber6
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 0e9e945..9ab7030 100644
--- a/flang/lib/Frontend/CompilerInvocation.cpp
+++ b/flang/lib/Frontend/CompilerInvocation.cpp
@@ -129,6 +129,11 @@ static void parseCodeGenArgs(Fortran::frontend::CodeGenOptions &opts,
for (auto *a : args.filtered(clang::driver::options::OPT_fpass_plugin_EQ))
opts.LLVMPassPlugins.push_back(a->getValue());
+ // -fembed-offload-object option
+ for (auto *a :
+ args.filtered(clang::driver::options::OPT_fembed_offload_object_EQ))
+ opts.OffloadObjects.push_back(a->getValue());
+
// -mrelocation-model option.
if (const llvm::opt::Arg *A =
args.getLastArg(clang::driver::options::OPT_mrelocation_model)) {