From 53864acc97dbca98a15d3674cd1501efc31e7f61 Mon Sep 17 00:00:00 2001 From: rina Date: Mon, 26 Feb 2024 16:03:14 +1000 Subject: [PATCH] restore flags to bin/dune. a bit of a hack to support compilation on debian. --- bin/dune | 1 + llvm-disas/dune | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) 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")) )