Remove logging levels restrictions (#538)
* Fixes #537: Remove release mode logging levels restrictions; * Add information about log's logging levels in the README;
This commit is contained in:
committed by
Dan Gohman
parent
e8fc612dc2
commit
0b3d3ac880
@@ -130,6 +130,22 @@ protection. Just something to think about.
|
|||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary>Log configuration</summary>
|
||||||
|
|
||||||
|
Cranelift uses the `log` crate to log messages at various levels. It doesn't
|
||||||
|
specify any maximal logging level, so embedders can choose what it should be;
|
||||||
|
however, this can have an impact of Cranelift's code size. You can use `log`
|
||||||
|
features to reduce the maximum logging level. For instance if you want to limit
|
||||||
|
the level of logging to `warn` messages and above in release mode:
|
||||||
|
|
||||||
|
```
|
||||||
|
[dependency.log]
|
||||||
|
...
|
||||||
|
features = ["release_max_level_warn"]
|
||||||
|
```
|
||||||
|
</details>
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
<summary>Building the documentation</summary>
|
<summary>Building the documentation</summary>
|
||||||
|
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ failure = { version = "0.1.1", default-features = false, features = ["derive"] }
|
|||||||
failure_derive = { version = "0.1.1", default-features = false }
|
failure_derive = { version = "0.1.1", default-features = false }
|
||||||
hashmap_core = { version = "0.1.9", optional = true }
|
hashmap_core = { version = "0.1.9", optional = true }
|
||||||
target-lexicon = { version = "0.0.3", default-features = false }
|
target-lexicon = { version = "0.0.3", default-features = false }
|
||||||
log = { version = "0.4.4", default-features = false, features = ["release_max_level_warn"] }
|
log = { version = "0.4.4", default-features = false }
|
||||||
# It is a goal of the cranelift-codegen crate to have minimal external dependencies.
|
# It is a goal of the cranelift-codegen crate to have minimal external dependencies.
|
||||||
# Please don't add any unless they are essential to the task of creating binary
|
# Please don't add any unless they are essential to the task of creating binary
|
||||||
# machine code. Integration tests that need external dependencies can be
|
# machine code. Integration tests that need external dependencies can be
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
//! Cranelift DSL classes.
|
//! Cranelift DSL classes.
|
||||||
//!
|
//!
|
||||||
//! This module defines the classes that are used to define Cranelift
|
//! This module defines the classes that are used to define Cranelift
|
||||||
//! instructions and other entitties.
|
//! instructions and other entities.
|
||||||
|
|
||||||
pub mod types;
|
pub mod types;
|
||||||
|
|
||||||
|
|||||||
@@ -151,7 +151,7 @@ pub struct RegClassData {
|
|||||||
/// first register unit in each allocatable register.
|
/// first register unit in each allocatable register.
|
||||||
pub mask: RegUnitMask,
|
pub mask: RegUnitMask,
|
||||||
|
|
||||||
/// The global `RegInfo` instance containing that this register class.
|
/// The global `RegInfo` instance containing this register class.
|
||||||
pub info: &'static RegInfo,
|
pub info: &'static RegInfo,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ readme = "README.md"
|
|||||||
[dependencies]
|
[dependencies]
|
||||||
cranelift-codegen = { path = "../codegen", version = "0.22.0", default-features = false }
|
cranelift-codegen = { path = "../codegen", version = "0.22.0", default-features = false }
|
||||||
target-lexicon = { version = "0.0.3", default-features = false }
|
target-lexicon = { version = "0.0.3", default-features = false }
|
||||||
log = { version = "0.4.4", default-features = false, features = ["release_max_level_warn"] }
|
log = { version = "0.4.4", default-features = false }
|
||||||
hashmap_core = { version = "0.1.9", optional = true }
|
hashmap_core = { version = "0.1.9", optional = true }
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ cranelift-codegen = { path = "../codegen", version = "0.22.0", default-features
|
|||||||
cranelift-entity = { path = "../entity", version = "0.22.0", default-features = false }
|
cranelift-entity = { path = "../entity", version = "0.22.0", default-features = false }
|
||||||
hashmap_core = { version = "0.1.9", optional = true }
|
hashmap_core = { version = "0.1.9", optional = true }
|
||||||
failure = "0.1.1"
|
failure = "0.1.1"
|
||||||
log = { version = "0.4.4", default-features = false, features = ["release_max_level_warn"] }
|
log = { version = "0.4.4", default-features = false }
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = ["std"]
|
default = ["std"]
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ hashmap_core = { version = "0.1.9", optional = true }
|
|||||||
failure = { version = "0.1.1", default-features = false, features = ["derive"] }
|
failure = { version = "0.1.1", default-features = false, features = ["derive"] }
|
||||||
failure_derive = { version = "0.1.1", default-features = false }
|
failure_derive = { version = "0.1.1", default-features = false }
|
||||||
target-lexicon = { version = "0.0.3", default-features = false }
|
target-lexicon = { version = "0.0.3", default-features = false }
|
||||||
log = { version = "0.4.4", default-features = false, features = ["release_max_level_warn"] }
|
log = { version = "0.4.4", default-features = false }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
wabt = "0.6.0"
|
wabt = "0.6.0"
|
||||||
|
|||||||
Reference in New Issue
Block a user