diff --git a/dune b/dune index 5877eb600..7736d71b2 100644 --- a/dune +++ b/dune @@ -41,3 +41,7 @@ ppx_sexp_value ppx_variants_conv) (preprocess no_preprocessing)) + +(alias + (name default) + (deps (alias_rec install))) diff --git a/lib/bap/bap_init_toplevel.ml b/lib/bap/bap_init_toplevel.ml index 10d312b8e..eb579b898 100644 --- a/lib/bap/bap_init_toplevel.ml +++ b/lib/bap/bap_init_toplevel.ml @@ -15,9 +15,10 @@ let main () = let module Core_kernel_is_required = Core_kernel[@warning "-D"] in let loader = Topdirs.dir_load Format.err_formatter in setup_dynamic_loader loader; - install_printers (); match Bap_main.init ~argv: [|"baptop"|] () with - | Ok () -> () + | Ok () -> + install_printers (); + () | Error failed -> Format.eprintf "Failed to initialize BAP: %a@\n%!" Bap_main.Extension.Error.pp failed; diff --git a/lib/bap/dune b/lib/bap/dune index 3222bd82a..d648a3aa0 100644 --- a/lib/bap/dune +++ b/lib/bap/dune @@ -29,16 +29,14 @@ (library - (name baptop) + (name bap_init_toplevel) (public_name bap.top) - (modules bap_init_toplevel) - (private_modules bap_init_toplevel) - (library_flags (-linkall)) (modes byte) - (special_builtin_support findlib_dynload) + (modules bap_init_toplevel) + (optional) (libraries bap bap-main - bap-plugins + dune-site.toplevel ; to disable when toplevel support is not present compiler-libs compiler-libs.common)) diff --git a/lib/bap_plugins/dune b/lib/bap_plugins/dune index d564c94b4..30b0f5b85 100644 --- a/lib/bap_plugins/dune +++ b/lib/bap_plugins/dune @@ -19,7 +19,8 @@ (libraries core_kernel dynlink fileutils findlib uri bap-bundle bap-future dune-site - dune-site.plugins)) + dune-site.plugins + compiler-libs.common)) (generate_sites_module (module bap_plugins_sites) diff --git a/lib_test/bap/dune b/lib_test/bap/dune index aa2de567a..14b941294 100644 --- a/lib_test/bap/dune +++ b/lib_test/bap/dune @@ -6,5 +6,4 @@ test_image test_disasm test_sema - test_project -)) + test_project)) diff --git a/src/dune b/src/dune index 4070c2541..2de1a5a6e 100644 --- a/src/dune +++ b/src/dune @@ -43,4 +43,5 @@ (modules baptop) (modes byte) (link_flags (-linkall)) - (libraries utop threads findlib.dynload)) + (optional) + (libraries dune-site.plugins dune-site.toplevel utop threads findlib.dynload))