1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374(******************************************************************************)(* *)(* Alt-Ergo: The SMT Solver For Software Verification *)(* Copyright (C) 2013-2018 --- OCamlPro SAS *)(* *)(* This file is distributed under the terms of the license indicated *)(* in the file 'License.OCamlPro'. If 'License.OCamlPro' is not *)(* present, please contact us to clarify licensing. *)(* *)(******************************************************************************)(** A wrapper of the Dynlink module: we use Dynlink except when we want to
generate a static (native) binary **)[@@@ocaml.warning"-60"]moduleDummyDL=structtypeerror=string[@@@ocaml.warning"-38"]exceptionErroroferror[@@@ocaml.warning"-32"]leterror_messages=s[@@@ocaml.warning"-32"]letloadfile_=()endincludeDynlinkletloadverbosepmsg=ifverbosethenPrinter.print_dbg~flushed:false~module_name:"Dynlink""Loading the %s in %S ..."msgp;tryloadfilep;ifverbosethenPrinter.print_dbg~header:false"Success!"with|Errorm1->ifverbosethenbeginPrinter.print_dbg~header:false"@, Loading the %s in plugin %S failed!"msgp;Printer.print_err">> Failure message: %s"(error_messagem1);end;letpp=Format.sprintf"%s/%s"Config.pluginsdirpinifverbosethenPrinter.print_dbg~flushed:false~module_name:"Dynlink""Loading the %s in %S... with prefix %S..."msgpConfig.pluginsdir;tryloadfilepp;ifverbosethenPrinter.print_dbg~header:false"Success!"with|Errorm2->ifnot(verbose)thenbeginPrinter.print_err"@, Loading the %s in plugin %S failed!@,\
>> Failure message: %s"msgp(error_messagem1);end;Errors.run_error(Dynlink_error(Format.sprintf"@[<v 0>Trying to load the plugin from %S failed too!@ \
>> Failure message: %s@]"pp(error_messagem2)))