[flang-commits] [flang] 8bf0a40 - [flang][driver] Forward `-fopenmp`/`-fopenacc` to the host compiler
Andrzej Warzynski via flang-commits
flang-commits at lists.llvm.org
Thu Jul 29 03:23:07 PDT 2021
Author: Andrzej Warzynski
Date: 2021-07-29T11:21:56+01:00
New Revision: 8bf0a406087e8747383134847ab0f165e6475a97
URL: https://github.com/llvm/llvm-project/commit/8bf0a406087e8747383134847ab0f165e6475a97
DIFF: https://github.com/llvm/llvm-project/commit/8bf0a406087e8747383134847ab0f165e6475a97.diff
LOG: [flang][driver] Forward `-fopenmp`/`-fopenacc` to the host compiler
This patch only modifies `flang` - the bash wrapper script.
`-fopenmp`/`-fopenacc` are required to enable the OpenMP/OpenACC
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`/`-fopenacc` is used for both unparsing and the code
generation (via the host compiler).
Differential Revision: https://reviews.llvm.org/D106871
Added:
Modified:
flang/tools/f18/flang.in
Removed:
################################################################################
diff --git a/flang/tools/f18/flang.in b/flang/tools/f18/flang.in
index b2ec2b5709c5f..165f01952b80e 100755
--- a/flang/tools/f18/flang.in
+++ b/flang/tools/f18/flang.in
@@ -200,8 +200,6 @@ categorise_opts()
[[ $opt == "-flarge-sizes" ]] ||
[[ $opt == "-flogical-abbreviations" ]] ||
[[ $opt == "-fno-color-diagnostics" ]] ||
- [[ $opt == "-fopenacc" ]] ||
- [[ $opt == "-fopenmp" ]] ||
[[ $opt == "-fxor-operator" ]] ||
[[ $opt == "-help" ]] ||
[[ $opt == "-nocpp" ]] ||
@@ -216,8 +214,13 @@ categorise_opts()
# `-fdebug-unparse` will always be in free form.
[[ $opt == "-Mfixed" ]] || [[ $opt == "-Mfree" ]]; then
:
- elif [[ $opt =~ -I.* ]] || [[ $opt =~ -J.* ]]; then
+ elif
# Options that are needed for both Flang and the external driver.
+ [[ $opt =~ -I.* ]] ||
+ [[ $opt =~ -J.* ]] ||
+ [[ $opt == "-fopenmp" ]] ||
+ [[ $opt == "-fopenacc" ]] ||
+ ; then
flang_opts+=($opt)
fc_opts+=($opt)
else
More information about the flang-commits
mailing list