Made Capstone an optional dependency (fixes #382) (#383)

* Made Capstone an optional dependency (fixes #382).

* Introduced feature 'disas' for disassembly (related to #382).

* Made 'disas' a default feature in cretonne-tools.

* Fixed errors in src/compile.rs introduced by get_disassembler changes.

- Moves `use` statements before the function declaration.
- Returns an error if the disassembler cannot be found created.
This commit is contained in:
Grégoire Geis
2018-07-04 05:54:54 +02:00
committed by Dan Gohman
parent ff5660624d
commit e5014e0fff
3 changed files with 56 additions and 39 deletions

View File

@@ -17,6 +17,7 @@ extern crate docopt;
extern crate filecheck;
#[macro_use]
extern crate serde_derive;
#[cfg(feature = "disas")]
extern crate capstone;
extern crate term;