[PATCH] D117767: [flang] Fix checking of undefined variables in wrapper.
Yury Gribov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 20 02:50:50 PST 2022
ygribov created this revision.
ygribov added reviewers: tskeith, awarzynski, kiranchandramohan.
Herald added a reviewer: sscalpone.
Herald added a project: Flang.
ygribov requested review of this revision.
Herald added subscribers: llvm-commits, jdoerfert.
Herald added a project: LLVM.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D117767
Files:
flang/tools/f18/flang
Index: flang/tools/f18/flang
===================================================================
--- flang/tools/f18/flang
+++ flang/tools/f18/flang
@@ -284,17 +284,15 @@
local -n opts=$3
local ext_fc=""
- if [[ -v $FLANG_FC ]]; then
+ if [[ -v FLANG_FC ]]; then
ext_fc="${FLANG_FC}"
- elif [[ -v $F18_FC ]]; then
+ elif [[ -v F18_FC ]]; then
# We support F18_FC for backwards compatibility.
ext_fc="${F18_FC}"
else
ext_fc=gfortran
fi
-
- local ext_fc="${FLANG_FC:-gfortran}"
local -r wd=$(cd "$(dirname "$0")/.." && pwd)
# Use the provided output file name.
@@ -417,7 +415,15 @@
done
# STEP 2: Compile Fortran Source Files
- readonly ext_fc="${F18_FC:-gfortran}"
+ local ext_fc=""
+ if [[ -v FLANG_FC ]]; then
+ ext_fc="${FLANG_FC}"
+ elif [[ -v F18_FC ]]; then
+ # We support F18_FC for backwards compatibility.
+ ext_fc="${F18_FC}"
+ else
+ ext_fc=gfortran
+ fi
# Temporary object files generated by this script. To be deleted at the end.
local temp_object_files=()
for idx in "${!fortran_source_files[@]}"; do
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D117767.401574.patch
Type: text/x-patch
Size: 1098 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220120/a0639087/attachment.bin>
More information about the llvm-commits
mailing list