get-llvm-path   scheme


Defined in:  https://github.com/digego/extempore/tree/v0.8.9/runtime/llvmti.xtm

Implementation

(define get-llvm-path
  (lambda ()
    (let ((path_from_env (sys:command-output (unix-or-Windows "echo $EXT_LLVM_DIR" "echo %EXT_LLVM_DIR%"))))
      (cond
       ((not (or (string=? path_from_env "") (string=? path_from_env "%EXT_LLVM_DIR%")))
        (sanitize-platform-path path_from_env))
       ((not (null? (sys:directory-list (string-append (sys:share-dir) "/llvm"))))
        (sanitize-platform-path (string-append (sys:share-dir) "/llvm")))
       (else
        (print-with-colors 'yellow 'default #t (print "Warning"))
        (print " could not find llvm path\n")
        #f)))))


Back to Index