mirror of
https://github.com/bitcoin/bitcoin.git
synced 2024-11-20 10:38:42 +01:00
658685af93
This improves support for LTO by using gcc wrappers for ar, nm, ranlib, that correctly setup plugin arguments for LTO. Other HOSTS are using clang.
27 lines
664 B
Makefile
27 lines
664 B
Makefile
ifneq ($(shell $(SHELL) $(.SHELLFLAGS) "command -v $(host)-g++-posix"),)
|
|
mingw32_CXX := $(host)-g++-posix
|
|
endif
|
|
|
|
mingw32_CFLAGS=-pipe -std=$(C_STANDARD)
|
|
mingw32_CXXFLAGS=-pipe -std=$(CXX_STANDARD)
|
|
|
|
ifneq ($(LTO),)
|
|
mingw32_CFLAGS += -flto
|
|
mingw32_CXXFLAGS += -flto
|
|
mingw32_LDFLAGS += -flto
|
|
|
|
mingw32_AR = $(host_toolchain)gcc-ar
|
|
mingw32_NM = $(host_toolchain)gcc-nm
|
|
mingw32_RANLIB = $(host_toolchain)gcc-ranlib
|
|
endif
|
|
|
|
mingw32_release_CFLAGS=-O2
|
|
mingw32_release_CXXFLAGS=$(mingw32_release_CFLAGS)
|
|
|
|
mingw32_debug_CFLAGS=-O1
|
|
mingw32_debug_CXXFLAGS=$(mingw32_debug_CFLAGS)
|
|
|
|
mingw32_debug_CPPFLAGS=-D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC
|
|
|
|
mingw32_cmake_system=Windows
|