mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-10 05:57:59 +01:00
build: remove --enable-lto
This has outlived its usefulness, doesn't gel well with newer compilers & `-flto` related options, i.e thin vs full, or `=auto`, and having `-flto` as the only option means that sometimes this just needs to be worked around, i.e in oss-fuzz: https://github.com/google/oss-fuzz/blob/master/projects/bitcoin-core/build.sh. While it was convenient when `-flto` was newer, support for `-flto` is now in all compilers we use, and there's also no-longer any real need for us to treat `-flto` different to any other optimization option. Remove it, to remove build complexity, and so there's no need to port a similar option to CMake. Note that the LTO option remains in depends, because we still a way to build packages that have LTO specific patches/options. If we decide to merge this, I'll follow up downstream in oss-fuzz first, to make sure we don't break the build.
This commit is contained in:
@@ -9,11 +9,6 @@ endif
|
||||
android_CFLAGS=-std=$(C_STANDARD)
|
||||
android_CXXFLAGS=-std=$(CXX_STANDARD)
|
||||
|
||||
ifneq ($(LTO),)
|
||||
android_CFLAGS += -flto
|
||||
android_LDFLAGS += -flto
|
||||
endif
|
||||
|
||||
android_AR=$(ANDROID_TOOLCHAIN_BIN)/llvm-ar
|
||||
android_RANLIB=$(ANDROID_TOOLCHAIN_BIN)/llvm-ranlib
|
||||
|
||||
|
||||
@@ -97,12 +97,6 @@ darwin_CFLAGS=-pipe -std=$(C_STANDARD)
|
||||
darwin_CXXFLAGS=-pipe -std=$(CXX_STANDARD)
|
||||
darwin_LDFLAGS=-Wl,-platform_version,macos,$(OSX_MIN_VERSION),$(OSX_SDK_VERSION)
|
||||
|
||||
ifneq ($(LTO),)
|
||||
darwin_CFLAGS += -flto
|
||||
darwin_CXXFLAGS += -flto
|
||||
darwin_LDFLAGS += -flto
|
||||
endif
|
||||
|
||||
darwin_release_CFLAGS=-O2
|
||||
darwin_release_CXXFLAGS=$(darwin_release_CFLAGS)
|
||||
|
||||
|
||||
@@ -1,12 +1,6 @@
|
||||
freebsd_CFLAGS=-pipe -std=$(C_STANDARD)
|
||||
freebsd_CXXFLAGS=-pipe -std=$(CXX_STANDARD)
|
||||
|
||||
ifneq ($(LTO),)
|
||||
freebsd_CFLAGS += -flto
|
||||
freebsd_CXXFLAGS += -flto
|
||||
freebsd_LDFLAGS += -flto
|
||||
endif
|
||||
|
||||
freebsd_release_CFLAGS=-O2
|
||||
freebsd_release_CXXFLAGS=$(freebsd_release_CFLAGS)
|
||||
|
||||
|
||||
@@ -2,10 +2,6 @@ linux_CFLAGS=-pipe -std=$(C_STANDARD)
|
||||
linux_CXXFLAGS=-pipe -std=$(CXX_STANDARD)
|
||||
|
||||
ifneq ($(LTO),)
|
||||
linux_CFLAGS += -flto
|
||||
linux_CXXFLAGS += -flto
|
||||
linux_LDFLAGS += -flto
|
||||
|
||||
linux_AR = $(host_toolchain)gcc-ar
|
||||
linux_NM = $(host_toolchain)gcc-nm
|
||||
linux_RANLIB = $(host_toolchain)gcc-ranlib
|
||||
|
||||
@@ -6,10 +6,6 @@ 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
|
||||
|
||||
@@ -2,10 +2,6 @@ netbsd_CFLAGS=-pipe -std=$(C_STANDARD)
|
||||
netbsd_CXXFLAGS=-pipe -std=$(CXX_STANDARD)
|
||||
|
||||
ifneq ($(LTO),)
|
||||
netbsd_CFLAGS += -flto
|
||||
netbsd_CXXFLAGS += -flto
|
||||
netbsd_LDFLAGS += -flto
|
||||
|
||||
netbsd_AR = $(host_toolchain)gcc-ar
|
||||
netbsd_NM = $(host_toolchain)gcc-nm
|
||||
netbsd_RANLIB = $(host_toolchain)gcc-ranlib
|
||||
|
||||
@@ -1,12 +1,6 @@
|
||||
openbsd_CFLAGS=-pipe -std=$(C_STANDARD)
|
||||
openbsd_CXXFLAGS=-pipe -std=$(CXX_STANDARD)
|
||||
|
||||
ifneq ($(LTO),)
|
||||
openbsd_CFLAGS += -flto
|
||||
openbsd_CXXFLAGS += -flto
|
||||
openbsd_LDFLAGS += -flto
|
||||
endif
|
||||
|
||||
openbsd_release_CFLAGS=-O2
|
||||
openbsd_release_CXXFLAGS=$(openbsd_release_CFLAGS)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user