mirror of
https://github.com/status-im/nimbus-eth2.git
synced 2025-02-02 01:36:06 +00:00
Nim define for disabling LTO (#1751)
This commit is contained in:
parent
feece1382d
commit
fffecbc8fd
12
README.md
12
README.md
@ -465,6 +465,18 @@ make -j$(nproc) NIMFLAGS="-d:release" USE_MULTITAIL=yes eth2_network_simulation
|
||||
make USE_LIBBACKTRACE=0 # expect the resulting binaries to be 2-3 times slower
|
||||
```
|
||||
|
||||
- disable `-march=native` because you want to run the binary on a different machine than the one you're building it on:
|
||||
|
||||
```bash
|
||||
make NIMFLAGS="-d:disableMarchNative" beacon_node
|
||||
```
|
||||
|
||||
- disable link-time optimisation (LTO):
|
||||
|
||||
```bash
|
||||
make NIMFLAGS="-d:disableLTO" beacon_node
|
||||
```
|
||||
|
||||
- publish a book using [mdBook](https://github.com/rust-lang/mdBook) from sources in "docs/" to GitHub pages:
|
||||
|
||||
```bash
|
||||
|
@ -14,7 +14,7 @@ else:
|
||||
|
||||
# `-flto` gives a significant improvement in processing speed, specially hash tree and state transition (basically any CPU-bound code implemented in nim)
|
||||
# With LTO enabled, optimization flags should be passed to both compiler and linker!
|
||||
if defined(release):
|
||||
if defined(release) and not defined(disableLTO):
|
||||
if defined(macosx): # Clang
|
||||
switch("passC", "-flto=thin")
|
||||
switch("passL", "-flto=thin")
|
||||
|
Loading…
x
Reference in New Issue
Block a user