Work around Cargo #4866. (#699)

* Work around Cargo build #4866.

This fixes #697.

* Rename "cargo4866workaround" to "core" per review feedback.
This commit is contained in:
Dan Gohman
2019-03-26 11:28:39 -07:00
committed by GitHub
parent 1784060baf
commit 82c6867155
2 changed files with 21 additions and 4 deletions

View File

@@ -26,7 +26,7 @@ log = { version = "0.4.6", default-features = false }
# accomodated in `tests`. # accomodated in `tests`.
[build-dependencies] [build-dependencies]
cranelift-codegen-meta = { path = "meta", version = "0.30.0" } cranelift-codegen-meta = { path = "meta", version = "0.30.0", default-features = false }
[features] [features]
default = ["std", "x86", "arm32", "arm64", "riscv"] default = ["std", "x86", "arm32", "arm64", "riscv"]
@@ -34,8 +34,19 @@ default = ["std", "x86", "arm32", "arm64", "riscv"]
# The "std" feature enables use of libstd. The "core" feature enables use # The "std" feature enables use of libstd. The "core" feature enables use
# of some minimal std-like replacement libraries. At least one of these two # of some minimal std-like replacement libraries. At least one of these two
# features need to be enabled. # features need to be enabled.
std = ["cranelift-entity/std", "cranelift-bforest/std", "target-lexicon/std"] std = [
core = ["hashmap_core"] "cranelift-entity/std",
"cranelift-bforest/std",
"target-lexicon/std",
"cranelift-codegen-meta/std"
]
# The "core" features enables use of "hashmap_core" since core doesn't have
# a HashMap implementation, and a workaround for Cargo #4866.
core = [
"hashmap_core",
"cranelift-codegen-meta/core"
]
# This enables some additional functions useful for writing tests, but which # This enables some additional functions useful for writing tests, but which
# can significantly increase the size of the library. # can significantly increase the size of the library.

View File

@@ -9,8 +9,14 @@ readme = "README.md"
edition = "2018" edition = "2018"
[dependencies] [dependencies]
cranelift-entity = { path = "../../cranelift-entity", version = "0.30.0" } cranelift-entity = { path = "../../cranelift-entity", version = "0.30.0", default-features = false }
[badges] [badges]
maintenance = { status = "experimental" } maintenance = { status = "experimental" }
travis-ci = { repository = "CraneStation/cranelift" } travis-ci = { repository = "CraneStation/cranelift" }
[features]
default = ["std"]
std = ["cranelift-entity/std"]
# The "core" feature enables a workaround for Cargo #4866.
core = ["cranelift-entity/core"]