mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 03:37:49 +02:00
Automate AES-NI and AVX detection on runtime, make it default on x86-based systems (#1578)
Rework CPU extensions detection code and build with AES-NI and AVX support by default
This commit is contained in:
parent
7e874eaa7c
commit
62cd9fffa3
26 changed files with 208 additions and 237 deletions
|
@ -37,7 +37,10 @@ namespace api
|
|||
i2p::fs::Init();
|
||||
|
||||
bool precomputation; i2p::config::GetOption("precomputation.elgamal", precomputation);
|
||||
i2p::crypto::InitCrypto (precomputation);
|
||||
bool aesni; i2p::config::GetOption("cpuext.aesni", aesni);
|
||||
bool avx; i2p::config::GetOption("cpuext.avx", avx);
|
||||
bool forceCpuExt; i2p::config::GetOption("cpuext.force", forceCpuExt);
|
||||
i2p::crypto::InitCrypto (precomputation, aesni, avx, forceCpuExt);
|
||||
|
||||
int netID; i2p::config::GetOption("netid", netID);
|
||||
i2p::context.SetNetID (netID);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue