replace forked libbacktrace submodule (#8)

with upstream libbacktrace submodule, which works with LTO
This commit is contained in:
Ștefan Talpalaru 2020-09-28 17:49:48 +02:00 committed by GitHub
parent 107878ad53
commit 8121c08e0e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 18 additions and 11 deletions

View File

@ -26,8 +26,8 @@ install:
- SET PATH=%CD%\Nim\bin;%PATH%
# ./configure can't figure out the "MSYS_NT-6.3" platform with old autoconf files
- curl -o vendor\libbacktrace\config.guess -L -s -S "http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD"
- curl -o vendor\libbacktrace\config.sub -L -s -S "http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD"
- curl -o vendor\libbacktrace-upstream\config.guess -L -s -S "http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD"
- curl -o vendor\libbacktrace-upstream\config.sub -L -s -S "http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD"
test_script:
- mingw32-make test

10
.gitmodules vendored
View File

@ -1,10 +1,10 @@
[submodule "vendor/libbacktrace"]
path = vendor/libbacktrace
url = https://github.com/status-im/libbacktrace.git
ignore = dirty
branch = master
[submodule "vendor/whereami"]
path = vendor/whereami
url = https://github.com/gpakosz/whereami.git
ignore = dirty
branch = master
[submodule "vendor/libbacktrace-upstream"]
path = vendor/libbacktrace-upstream
url = https://github.com/ianlancetaylor/libbacktrace.git
ignore = dirty
branch = master

View File

@ -128,7 +128,7 @@ export CXXFLAGS
$(LIBDIR)/libbacktrace.a:
endif # USE_VENDORED_LIBUNWIND
echo -e $(BUILD_MSG) "$@" && \
cd vendor/libbacktrace && \
cd vendor/libbacktrace-upstream && \
./configure --prefix="/usr" --libdir="/usr/lib" --disable-shared --enable-static --with-pic MAKE="$(MAKE)" $(HANDLE_OUTPUT) && \
$(LIBBACKTRACE_SED) && \
$(MAKE) -j1 DESTDIR="$(CURDIR)/install" clean all install $(HANDLE_OUTPUT)
@ -154,6 +154,11 @@ $(TESTS): all
$(eval CMD := nim c $(NIM_PARAMS) --debugger:native -d:release tests/$@.nim) $(ECHO_AND_RUN)
$(eval CMD := nim c $(NIM_PARAMS) --debugger:native -d:danger tests/$@.nim) $(ECHO_AND_RUN)
$(eval CMD := nim c $(NIM_PARAMS) --debugger:native -d:release -d:nimStackTraceOverride tests/$@.nim) $(ECHO_AND_RUN)
ifeq ($(shell uname), Darwin)
$(eval CMD := nim c $(NIM_PARAMS) --debugger:native -d:release --passC:-flto=thin --passL:"-flto=thin -Wl,-object_path_lto,build/$@.lto" tests/$@.nim) $(ECHO_AND_RUN)
else
$(eval CMD := nim c $(NIM_PARAMS) --debugger:native -d:release --passC:-flto=auto --passL:-flto=auto tests/$@.nim) $(ECHO_AND_RUN)
endif
ifeq ($(BUILD_CXX_LIB), 1)
# for the C++ backend:
$(eval CMD := nim cpp $(NIM_PARAMS) --debugger:native tests/$@.nim) $(ECHO_AND_RUN)
@ -162,7 +167,7 @@ endif
clean:
rm -rf install build *.o
cd vendor/libbacktrace && \
cd vendor/libbacktrace-upstream && \
{ [[ -e Makefile ]] && $(MAKE) clean $(HANDLE_OUTPUT) || true; }
$(SILENT_TARGET_PREFIX).SILENT:

View File

@ -9,7 +9,9 @@
# In theory, this simple file could be generated by c2nim. In practice, c2nim
# can't handle "__attribute__((...))".
when not declared(cuintptr_t):
when defined(nimStackTraceOverride) and defined(nimHasStacktracesModule):
import system/stacktraces
else:
# There is a disparity on macOS where Nim's `uint` is `unsigned long long` and
# `uintptr_t` is `unsigned long`. Even though both data types are the same
# size (64 bits), clang++ refuses to do automatic conversion between them.

1
vendor/libbacktrace vendored

@ -1 +0,0 @@
Subproject commit 2e878a38dd7144c84b665019b1085ea38ebe56d1

1
vendor/libbacktrace-upstream vendored Submodule

@ -0,0 +1 @@
Subproject commit 95e8e96c86349815b86001171d090a76bd0e1ddb