[flang-commits] [flang] 3780de4 - [flang][driver] Error if uuidgen is not installed

David Spickett via flang-commits flang-commits at lists.llvm.org
Fri Oct 1 01:43:28 PDT 2021


Author: David Spickett
Date: 2021-10-01T09:42:58+01:00
New Revision: 3780de46001b510d78cd3f06f01a6f08793a4a45

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

LOG: [flang][driver] Error if uuidgen is not installed

Ubuntu Bionic installs it by default, Focal does not.

Differential Revision: https://reviews.llvm.org/D110694

Added: 
    

Modified: 
    flang/tools/f18/flang

Removed: 
    


################################################################################
diff  --git a/flang/tools/f18/flang b/flang/tools/f18/flang
index 7e1832265a2ce..25397f377a112 100755
--- a/flang/tools/f18/flang
+++ b/flang/tools/f18/flang
@@ -353,6 +353,13 @@ main() {
 
   local -r wd=$(cd "$(dirname "$0")/.." && pwd)
 
+  # uuidgen is common but not installed by default on some distros
+  if ! command -v uuidgen &> /dev/null
+  then
+    echo "uuidgen is required for generating unparsed file names."
+    exit 1
+  fi
+
   # STEP 1: Unparse
   # Base-name for the unparsed files. These are just temporary files that are
   # first generated and then deleted by this script.


        


More information about the flang-commits mailing list