Merge branch 'master' into bforest
This commit is contained in:
@@ -34,6 +34,8 @@ term = "0.5.1"
|
||||
capstone = { version = "0.4", optional = true }
|
||||
wabt = { version = "0.4", optional = true }
|
||||
target-lexicon = "0.0.3"
|
||||
pretty_env_logger = "0.2.4"
|
||||
file-per-thread-logger = "0.1.1"
|
||||
|
||||
[features]
|
||||
default = ["disas", "wasm"]
|
||||
|
||||
@@ -8,7 +8,7 @@ into executable machine code.
|
||||
|
||||
[](https://cranelift.readthedocs.io/en/latest/?badge=latest)
|
||||
[](https://travis-ci.org/CraneStation/cranelift)
|
||||
[](https://gitter.im/CraneStation/Lobby/~chat)
|
||||
[](https://gitter.im/CraneStation/Lobby)
|
||||
|
||||
For more information, see [the
|
||||
documentation](https://cranelift.readthedocs.io/en/latest/?badge=latest).
|
||||
@@ -127,7 +127,7 @@ Building the documentation
|
||||
--------------------------
|
||||
|
||||
To build the Cranelift documentation, you need the [Sphinx documentation
|
||||
generator](https://www.sphinx-doc.org/):
|
||||
generator](http://www.sphinx-doc.org/) as well as Python 3::
|
||||
|
||||
$ pip install sphinx sphinx-autobuild sphinx_rtd_theme
|
||||
$ cd cranelift/docs
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#![deny(trivial_numeric_casts)]
|
||||
#![warn(unused_import_braces, unstable_features, unused_extern_crates)]
|
||||
#![deny(trivial_numeric_casts, unused_extern_crates, unstable_features)]
|
||||
#![warn(unused_import_braces)]
|
||||
#![cfg_attr(
|
||||
feature = "cargo-clippy",
|
||||
warn(
|
||||
@@ -14,11 +14,13 @@ extern crate cranelift_codegen;
|
||||
extern crate cranelift_filetests;
|
||||
extern crate cranelift_reader;
|
||||
extern crate docopt;
|
||||
extern crate file_per_thread_logger;
|
||||
extern crate filecheck;
|
||||
#[macro_use]
|
||||
extern crate serde_derive;
|
||||
#[cfg(feature = "disas")]
|
||||
extern crate capstone;
|
||||
extern crate pretty_env_logger;
|
||||
extern crate term;
|
||||
|
||||
cfg_if! {
|
||||
@@ -31,6 +33,7 @@ cfg_if! {
|
||||
}
|
||||
extern crate target_lexicon;
|
||||
|
||||
use cranelift_codegen::dbg::LOG_FILENAME_PREFIX;
|
||||
use cranelift_codegen::{timing, VERSION};
|
||||
use docopt::Docopt;
|
||||
use std::io::{self, Write};
|
||||
@@ -46,16 +49,17 @@ const USAGE: &str = "
|
||||
Cranelift code generator utility
|
||||
|
||||
Usage:
|
||||
clif-util test [-vT] <file>...
|
||||
clif-util cat <file>...
|
||||
clif-util filecheck [-v] <file>
|
||||
clif-util print-cfg <file>...
|
||||
clif-util compile [-vpT] [--set <set>]... [--target <triple>] <file>...
|
||||
clif-util wasm [-ctvpTs] [--set <set>]... [--target <triple>] <file>...
|
||||
clif-util test [-vTd] <file>...
|
||||
clif-util cat [-d] <file>...
|
||||
clif-util filecheck [-vd] <file>
|
||||
clif-util print-cfg [-d] <file>...
|
||||
clif-util compile [-vpTd] [--set <set>]... [--target <triple>] <file>...
|
||||
clif-util wasm [-ctvpTsd] [--set <set>]... [--target <triple>] <file>...
|
||||
clif-util --help | --version
|
||||
|
||||
Options:
|
||||
-v, --verbose be more verbose
|
||||
-d, --debug enable debug output on stderr/stdout
|
||||
-T, --time-passes
|
||||
print pass timing report
|
||||
-t, --just-decode
|
||||
@@ -90,6 +94,7 @@ struct Args {
|
||||
flag_target: String,
|
||||
flag_time_passes: bool,
|
||||
flag_print_size: bool,
|
||||
flag_debug: bool,
|
||||
}
|
||||
|
||||
/// A command either succeeds or fails with an error message.
|
||||
@@ -106,6 +111,12 @@ fn clif_util() -> CommandResult {
|
||||
})
|
||||
.unwrap_or_else(|e| e.exit());
|
||||
|
||||
if args.flag_debug {
|
||||
pretty_env_logger::init();
|
||||
} else {
|
||||
file_per_thread_logger::initialize(LOG_FILENAME_PREFIX);
|
||||
}
|
||||
|
||||
// Find the sub-command to execute.
|
||||
let result = if args.cmd_test {
|
||||
cranelift_filetests::run(args.flag_verbose, &args.arg_file).map(|_time| ())
|
||||
|
||||
Reference in New Issue
Block a user