mirror of
https://github.com/sigp/lighthouse.git
synced 2026-05-07 16:55:46 +00:00
Improve compilation error on 32-bit (#2424)
## Issue Addressed Closes #1661 ## Proposed Changes Add a dummy package called `target_check` which gets compiled early in the build and fails if the target is 32-bit ## Additional Info You can test the efficacy of this check with: ``` cross build --release --manifest-path lighthouse/Cargo.toml --target i686-unknown-linux-gnu ``` In which case this compilation error is shown: ``` error: Lighthouse requires a 64-bit CPU and operating system --> common/target_check/src/lib.rs:8:1 | 8 | / assert_cfg!( 9 | | target_pointer_width = "64", 10 | | "Lighthouse requires a 64-bit CPU and operating system", 11 | | ); | |__^ ```
This commit is contained in:
@@ -47,6 +47,7 @@ lazy_static = "1.4.0"
|
||||
serde_json = "1.0.59"
|
||||
task_executor = { path = "../common/task_executor" }
|
||||
malloc_utils = { path = "../common/malloc_utils" }
|
||||
target_check = { path = "../common/target_check" }
|
||||
|
||||
[dev-dependencies]
|
||||
tempfile = "3.1.0"
|
||||
@@ -57,3 +58,8 @@ eth2_libp2p = { path = "../beacon_node/eth2_libp2p" }
|
||||
[[test]]
|
||||
name = "lighthouse_tests"
|
||||
path = "tests/main.rs"
|
||||
|
||||
# Prevent cargo-udeps from flagging the dummy package `target_check`, which exists only
|
||||
# to assert properties of the compilation target.
|
||||
[package.metadata.cargo-udeps.ignore]
|
||||
normal = ["target_check"]
|
||||
|
||||
Reference in New Issue
Block a user