rustpq / pqcrypto

Rust Post-Quantum cryptography
212 stars 38 forks source link

Fix build.rs in pqcrypto-internals for cross-compilation #27

Closed RW-sec closed 2 years ago

RW-sec commented 2 years ago

Hi Thom, at the moment pqcrypto cannot be cross-compiled, because the build.rs file in pqcrypto-internals fails during cross-compilation. This is a similar issue compared to https://github.com/rustpq/pqcrypto/issues/14 as the build.rs file is compiled for the host system. If the host system is an x86 system it tries to compile the Keccak algorithm with AVX2 support for the other architecture even though it does not have support for it (e.g. ARM). This PR changes the detection mechanism of the architecture by using the environment variables from Cargo.