[PATCH] D106871: [flang][driver] Forward `-fopenmp` to the host compiler
Andrzej Warzynski via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 27 06:16:28 PDT 2021
awarzynski created this revision.
Herald added subscribers: guansong, yaxunl.
awarzynski requested review of this revision.
Herald added a reviewer: jdoerfert.
Herald added subscribers: llvm-commits, sstefan1.
Herald added a project: LLVM.
This patch only modifies `flang` - the bash wrapper script.
`-fopenmp` is required to enable the OpenMP extension in the frontend
and to make sure that the required libraries are linked when generating
the final binary. This patch makes sure that `-fopnemp` is used for both
unparsing and the code generation (via the host compiler).
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D106871
Files:
flang/tools/f18/flang.in
Index: flang/tools/f18/flang.in
===================================================================
--- flang/tools/f18/flang.in
+++ flang/tools/f18/flang.in
@@ -201,7 +201,6 @@
[[ $opt == "-flogical-abbreviations" ]] ||
[[ $opt == "-fno-color-diagnostics" ]] ||
[[ $opt == "-fopenacc" ]] ||
- [[ $opt == "-fopenmp" ]] ||
[[ $opt == "-fxor-operator" ]] ||
[[ $opt == "-help" ]] ||
[[ $opt == "-nocpp" ]] ||
@@ -216,7 +215,9 @@
# `-fdebug-unparse` will always be in free form.
[[ $opt == "-Mfixed" ]] || [[ $opt == "-Mfree" ]]; then
:
- elif [[ $opt =~ -I.* ]] || [[ $opt =~ -J.* ]]; then
+ elif [[ $opt =~ -I.* ]] ||
+ [[ $opt =~ -J.* ]] ||
+ [[ $opt == "-fopenmp" ]]; then
# Options that are needed for both Flang and the external driver.
flang_opts+=($opt)
fc_opts+=($opt)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D106871.362005.patch
Type: text/x-patch
Size: 880 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210727/2b616db7/attachment.bin>
More information about the llvm-commits
mailing list