From de1b3315e85ab78b83f014c6b76215639413f580 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C8=98tefan=20Talpalaru?= Date: Mon, 28 Sep 2020 21:23:53 +0200 Subject: [PATCH] bump nim-libbacktrace (#1769) * bump nim-libbacktrace so it works with LTO * macOS fix --- config.nims | 14 +++++++------- vendor/nim-libbacktrace | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/config.nims b/config.nims index a69cddc09..6c3f91fa0 100644 --- a/config.nims +++ b/config.nims @@ -4,26 +4,26 @@ if defined(arm64): # https://twitter.com/EthereumOnARM/status/1309477357938499585?s=20 # https://github.com/supranational/blst/issues/31 switch("define", "BLS_FORCE_BACKEND=miracl") - # --------------------------------------------------- -if defined(release): - switch("nimcache", "nimcache/release/$projectName") +when defined(release): + let nimCachePath = "nimcache/release/" & projectName() 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) # With LTO enabled, optimization flags should be passed to both compiler and linker! if defined(release) and not defined(disableLTO): if defined(macosx): # Clang switch("passC", "-flto=thin") - switch("passL", "-flto=thin") + switch("passL", "-flto=thin -Wl,-object_path_lto," & nimCachePath & "/lto") elif defined(linux): switch("passC", "-flto=auto") switch("passL", "-flto=auto") else: - # On windows, LTO needs more love and attention so the right linkers - # are used + # On windows, LTO needs more love and attention so "gcc-ar" and "gcc-ranlib" are + # used for static libraries. discard if defined(windows): diff --git a/vendor/nim-libbacktrace b/vendor/nim-libbacktrace index dc2c199d4..8121c08e0 160000 --- a/vendor/nim-libbacktrace +++ b/vendor/nim-libbacktrace @@ -1 +1 @@ -Subproject commit dc2c199d41dc90de75043d1ee4efe5e0323932bf +Subproject commit 8121c08e0e7bdf92f86012b4af2330434fa7ed5d