[PATCH] D105352: [flang][driver] Add support for `--version` in the bash wrapper
Andrzej Warzynski via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Jul 3 02:49:46 PDT 2021
This revision was automatically updated to reflect the committed changes.
Closed by commit rG45e5214b4354: [flang][driver] Add support for `--version` in the bash wrapper (authored by awarzynski).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D105352/new/
https://reviews.llvm.org/D105352
Files:
flang/tools/f18/flang.in
Index: flang/tools/f18/flang.in
===================================================================
--- flang/tools/f18/flang.in
+++ flang/tools/f18/flang.in
@@ -24,6 +24,7 @@
COMPILE_ONLY="False"
PREPROCESS_ONLY="False"
TEMP_OUTPUT="flang_temp_out_"
+PRINT_VERSION="False"
# === parse_args ==============================================================
#
@@ -90,6 +91,10 @@
PREPROCESS_ONLY="True"
fi
+ if [[ $1 == "-v" || $1 == "--version" ]]; then
+ PRINT_VERSION="True"
+ fi
+
shift
continue
@@ -204,7 +209,6 @@
[[ $opt == "-pedantic" ]] ||
[[ $opt =~ ^-std=.* ]] ||
[[ $opt =~ ^-U.* ]] ||
- [[ $opt == "--version" ]] ||
[[ $opt == "-Werror" ]]; then
flang_opts+=($opt)
elif [[ $opt =~ -I.* ]] || [[ $opt =~ -J.* ]]; then
@@ -266,6 +270,11 @@
main() {
parse_args "$@"
+ if [[ $PRINT_VERSION == "True" ]]; then
+ echo "flang version @FLANG_VERSION@"
+ exit 0
+ fi
+
fortran_source_files=()
other_source_files=()
object_files=()
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D105352.356335.patch
Type: text/x-patch
Size: 1070 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210703/388d68ad/attachment.bin>
More information about the llvm-commits
mailing list