diff options
author | Dominik Adamski <dominik.adamski@amd.com> | 2024-01-10 09:38:58 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-10 09:38:58 +0100 |
commit | f443fbc49b8914a8453de61aea741221df9648cf (patch) | |
tree | 35ddc90ec901106a467bbe3fa7dab995d6a2431a /flang/lib/Frontend/CompilerInvocation.cpp | |
parent | 8f78dd4b92b44c490d263a4d161850853874859d (diff) | |
download | llvm-f443fbc49b8914a8453de61aea741221df9648cf.zip llvm-f443fbc49b8914a8453de61aea741221df9648cf.tar.gz llvm-f443fbc49b8914a8453de61aea741221df9648cf.tar.bz2 |
[Flang][OpenMP][MLIR] Add support for -nogpulib option (#71045)
If -nogpulib option is passed by the user, then the OpenMP device
runtime is not used and we should not emit globals to configure
debugging at compile-time for the device runtime.
Link to -nogpulib flag implementation for Clang:
https://reviews.llvm.org/D125314
Diffstat (limited to 'flang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r-- | flang/lib/Frontend/CompilerInvocation.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/flang/lib/Frontend/CompilerInvocation.cpp b/flang/lib/Frontend/CompilerInvocation.cpp index b65b6e3..0732f4b 100644 --- a/flang/lib/Frontend/CompilerInvocation.cpp +++ b/flang/lib/Frontend/CompilerInvocation.cpp @@ -935,6 +935,8 @@ static bool parseDialectArgs(CompilerInvocation &res, llvm::opt::ArgList &args, args.hasArg(clang::driver::options::OPT_fopenmp_target_debug)) res.getLangOpts().OpenMPTargetDebug = 1; } + if (args.hasArg(clang::driver::options::OPT_nogpulib)) + res.getLangOpts().NoGPULib = 1; } switch (llvm::Triple(res.getTargetOpts().triple).getArch()) { |