[PATCH] D105896: [flang][driver] Fix output filename generation in `flang`
David Spickett via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 14 08:56:48 PDT 2021
DavidSpickett added a comment.
The specifics of the script are a bit beyond me but:
(without this change, flang always returns 0 on failure)
Definitely will help the test suite be clearer about what's failed where.
================
Comment at: flang/tools/f18/flang.in:337
for idx in "${!fortran_source_files[@]}"; do
- if ! "$wd/bin/@FLANG_DEFAULT_DRIVER@" "${flang_options[@]}" "${fortran_source_files[$idx]}" -o "${unparsed_file}_${idx}.f90"
- then status=$?
- echo flang: in "$PWD", @FLANG_DEFAULT_DRIVER@ failed with exit status $status: "$wd/bin/@FLANG_DEFAULT_DRIVER@" "${flang_options[@]}" "$@" >&2
- exit $status
+ "$wd/bin/@FLANG_DEFAULT_DRIVER@" "${flang_options[@]}" "${fortran_source_files[$idx]}" -o "${unparsed_file}_${idx}.f90"
+ ret_status=$?
----------------
I'm surprised that this works with:
```
set -euo pipefail
```
(but then again bash is always surprising)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D105896/new/
https://reviews.llvm.org/D105896
More information about the llvm-commits
mailing list