Partial LTO (#1789)
* initial partial LTO example * Add select private key related files to ignore LTO * Apply to keystores
This commit is contained in:
parent
c92d228ec8
commit
6bb6b66766
|
@ -11,6 +11,7 @@ export
|
|||
keystore
|
||||
|
||||
{.push raises: [Defect].}
|
||||
{.localPassC: "-fno-lto".} # no LTO for crypto
|
||||
|
||||
const
|
||||
keystoreFileName* = "keystore.json"
|
||||
|
|
|
@ -23,6 +23,7 @@ export
|
|||
results, burnMem, writeValue, readValue
|
||||
|
||||
{.push raises: [Defect].}
|
||||
{.localPassC: "-fno-lto".} # no LTO for crypto
|
||||
|
||||
type
|
||||
ChecksumFunctionKind* = enum
|
||||
|
|
|
@ -0,0 +1,35 @@
|
|||
# ############################################################
|
||||
#
|
||||
# No LTO for crypto
|
||||
#
|
||||
# ############################################################
|
||||
|
||||
# This applies per-file compiler flags to C files
|
||||
# which do not support {.localPassC: "-fno-lto".}
|
||||
# Unfortunately this is filename based instead of path-based
|
||||
# Assumes GCC
|
||||
|
||||
# BLST
|
||||
server.always = "-fno-lto"
|
||||
assembly.always = "-fno-lto"
|
||||
|
||||
# Secp256k1
|
||||
secp256k1.always = "-fno-lto"
|
||||
|
||||
# BearSSL - only RNGs
|
||||
aesctr_drbg.always = "-fno-lto"
|
||||
hmac_drbg.always = "-fno-lto"
|
||||
sysrng.always = "-fno-lto"
|
||||
|
||||
# Miracl - only ECP to derive public key from private key
|
||||
ecp_BLS12381.always = "-fno-lto"
|
||||
|
||||
# ############################################################
|
||||
#
|
||||
# Spurious warnings
|
||||
#
|
||||
# ############################################################
|
||||
|
||||
# sqlite3.c: In function ‘sqlite3SelectNew’:
|
||||
# vendor/nim-sqlite3-abi/sqlite3.c:124500: warning: function may return address of local variable [-Wreturn-local-addr]
|
||||
sqlite3.always = "-fno-lto" # -Wno-return-local-addr
|
Loading…
Reference in New Issue