[flang-commits] [flang] e302950 - [flang] Handle -S assemble only flag in flang-to-external-fc (#78979)

via flang-commits flang-commits at lists.llvm.org
Mon Jan 22 07:55:09 PST 2024


Author: David Spickett
Date: 2024-01-22T15:55:05Z
New Revision: e302950023cd99251371c5dc8a1e3b609dd5a8fe

URL: https://github.com/llvm/llvm-project/commit/e302950023cd99251371c5dc8a1e3b609dd5a8fe
DIFF: https://github.com/llvm/llvm-project/commit/e302950023cd99251371c5dc8a1e3b609dd5a8fe.diff

LOG: [flang] Handle -S assemble only flag in flang-to-external-fc (#78979)

Flang was recently updated on Compiler Explorer and by default it's in
assemble only mode, you have to enable linking and executing.

This means that the default output for flang-to-external-fc is nothing,
as it doesn't know what `-S` means. You'd have to know to enable the
link to binary option to see any output.

Handle `-S` so that users of Compiler Explorer don't have to wonder why
the "compiler" is broken.

Added: 
    

Modified: 
    flang/tools/f18/flang-to-external-fc.in

Removed: 
    


################################################################################
diff  --git a/flang/tools/f18/flang-to-external-fc.in b/flang/tools/f18/flang-to-external-fc.in
index 24ceda3b7812cf5..bd16c030121cbb9 100755
--- a/flang/tools/f18/flang-to-external-fc.in
+++ b/flang/tools/f18/flang-to-external-fc.in
@@ -108,6 +108,10 @@ parse_args()
           COMPILE_ONLY="True"
         fi
 
+        if [[ $1 == "-S" ]]; then
+          COMPILE_ONLY="True"
+        fi
+
         if [[ $1 == "-E" ]]; then
           PREPROCESS_ONLY="True"
         fi


        


More information about the flang-commits mailing list