diff --git a/bin/dune b/bin/dune index c7e714a..1b7a3d0 100644 --- a/bin/dune +++ b/bin/dune @@ -3,5 +3,6 @@ (name main) (modules main) (libraries gtirb_semantics base64 yojson asli.libASL llvm_disas) + (flags :standard -cclib (:include ../llvm-disas/llvmconf.sexp)) ) diff --git a/llvm-disas/dune b/llvm-disas/dune index 2e423d7..99fff35 100644 --- a/llvm-disas/dune +++ b/llvm-disas/dune @@ -8,6 +8,7 @@ (rule (targets llvmconf.sexp) - (action (bash "$(opam var conf-llvm:config) --libs > llvmconf.sexp")) + ; use opam if present otherwise fall back to $LLVM_CONFIG + (action (bash "if command -v opam; then llvm_config=$(opam var conf-llvm:config); fi ; ${llvm_config:-$LLVM_CONFIG} --libs > llvmconf.sexp")) )