parent
6050eebec0
commit
2396417581
18
config.nims
18
config.nims
|
@ -1,25 +1,21 @@
|
||||||
# Emergency fixes
|
when defined(release):
|
||||||
# ---------------------------------------------------
|
let nimCachePath = "nimcache/release/" & projectName()
|
||||||
|
|
||||||
# ---------------------------------------------------
|
|
||||||
|
|
||||||
if defined(release):
|
|
||||||
switch("nimcache", "nimcache/release/$projectName")
|
|
||||||
else:
|
else:
|
||||||
switch("nimcache", "nimcache/debug/$projectName")
|
let nimCachePath = "nimcache/debug/" & projectName()
|
||||||
|
switch("nimcache", nimCachePath)
|
||||||
|
|
||||||
# `-flto` gives a significant improvement in processing speed, specially hash tree and state transition (basically any CPU-bound code implemented in nim)
|
# `-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!
|
# With LTO enabled, optimization flags should be passed to both compiler and linker!
|
||||||
if defined(release) and not defined(disableLTO):
|
if defined(release) and not defined(disableLTO):
|
||||||
if defined(macosx): # Clang
|
if defined(macosx): # Clang
|
||||||
switch("passC", "-flto=thin")
|
switch("passC", "-flto=thin")
|
||||||
switch("passL", "-flto=thin")
|
switch("passL", "-flto=thin -Wl,-object_path_lto," & nimCachePath & "/lto")
|
||||||
elif defined(linux):
|
elif defined(linux):
|
||||||
switch("passC", "-flto=auto")
|
switch("passC", "-flto=auto")
|
||||||
switch("passL", "-flto=auto")
|
switch("passL", "-flto=auto")
|
||||||
else:
|
else:
|
||||||
# On windows, LTO needs more love and attention so the right linkers
|
# On windows, LTO needs more love and attention so "gcc-ar" and "gcc-ranlib" are
|
||||||
# are used
|
# used for static libraries.
|
||||||
discard
|
discard
|
||||||
|
|
||||||
if defined(windows):
|
if defined(windows):
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit dc2c199d41dc90de75043d1ee4efe5e0323932bf
|
Subproject commit 8121c08e0e7bdf92f86012b4af2330434fa7ed5d
|
Loading…
Reference in New Issue