Merge bitcoin/bitcoin#21778: build: LLD based macOS toolchain
e8c25e8a35guix: drop binutils from macOS env (fanquake)555fddf646guix: use GUIX_LD_WRAPPER_DISABLE_RPATH for all HOSTS (fanquake)9ec238d0f3guix: remove ZERO_AR_DATE export (fanquake)f836f7e9b3depends: remove cctools & libtapi (fanquake)4a0536c5d9build: switch to using lld for macOS builds (fanquake)c6a6b2d6fdbuild: add lld into macOS build environment(s) (fanquake)437e908ebddepends: swap cctools-x for llvm-x (fanquake)bab287d1badepends: don't use -no_warning_for_no_symbols in macOS qt build (fanquake) Pull request description: This switches us to using a [LLD](https://lld.llvm.org/) based toolchain for macOS builds. ### Benefits * Less complicated macOS toolchain. * No longer beholden to Apple releasing it's [source](https://opensource.apple.com/source/) for [cctools](https://opensource.apple.com/source/cctools/), [ld64](https://opensource.apple.com/source/ld64/) & [libtapi](https://opensource.apple.com/source/tapi/). * No more reliance on third parties to modify those sources for us. i.e [apple-libtapi](https://github.com/tpoechtrager/apple-libtapi), [cctools-port](https://github.com/tpoechtrager/cctools-port) (cctools + ld64). ACKs for top commit: theuni: Tentative ACKe8c25e8a35. Tree-SHA512: ec73304e8a2cd4c71041f7863d7d2e4e0408787299fb4fa3745076853156e8f64e4742e16f30d65e3a27f1e9c0d19cdf802248366b72a4fcb4ea821f92bb7a00
This commit is contained in:
18 files changed
+66
-162
No files matched your search
@@ -1,39 +0,0 @@
|
||||
package=native_cctools
|
||||
$(package)_version=c74fafe86076713cb8e6f937af43b6df6da1f42d
|
||||
$(package)_download_path=https://github.com/tpoechtrager/cctools-port/archive
|
||||
$(package)_file_name=$($(package)_version).tar.gz
|
||||
$(package)_sha256_hash=e2c1588d505a69c32e079f4e616e0f117d5478429040e394f624f43f2796e6bc
|
||||
$(package)_build_subdir=cctools
|
||||
$(package)_dependencies=native_libtapi
|
||||
|
||||
define $(package)_set_vars
|
||||
$(package)_config_opts=--target=$(host) --enable-lto-support
|
||||
$(package)_config_opts+=--with-llvm-config=$(llvm_config_prog)
|
||||
$(package)_ldflags+=-Wl,-rpath=\\$$$$$$$$\$$$$$$$$ORIGIN/../lib
|
||||
$(package)_cc=$(clang_prog)
|
||||
$(package)_cxx=$(clangxx_prog)
|
||||
endef
|
||||
|
||||
ifneq ($(strip $(FORCE_USE_SYSTEM_CLANG)),)
|
||||
define $(package)_preprocess_cmds
|
||||
mkdir -p $($(package)_staging_prefix_dir)/lib && \
|
||||
cp $(llvm_lib_dir)/libLTO.so $($(package)_staging_prefix_dir)/lib/
|
||||
endef
|
||||
else
|
||||
endif
|
||||
|
||||
define $(package)_config_cmds
|
||||
$($(package)_autoconf)
|
||||
endef
|
||||
|
||||
define $(package)_build_cmds
|
||||
$(MAKE)
|
||||
endef
|
||||
|
||||
define $(package)_stage_cmds
|
||||
$(MAKE) DESTDIR=$($(package)_staging_dir) install
|
||||
endef
|
||||
|
||||
define $(package)_postprocess_cmds
|
||||
rm -rf share
|
||||
endef
|
||||
@@ -1,22 +0,0 @@
|
||||
package=native_libtapi
|
||||
$(package)_version=eb33a59f2e30ff9724dc1ea8bee8b5229b0557c9
|
||||
$(package)_download_path=https://github.com/tpoechtrager/apple-libtapi/archive
|
||||
$(package)_file_name=$($(package)_version).tar.gz
|
||||
$(package)_sha256_hash=d4d46c64622f13d6938cecf989046d9561011bb59e8ee835f8f39825d67f578f
|
||||
$(package)_patches=disable_zlib.patch
|
||||
|
||||
ifeq ($(strip $(FORCE_USE_SYSTEM_CLANG)),)
|
||||
$(package)_dependencies=native_llvm
|
||||
endif
|
||||
|
||||
define $(package)_preprocess_cmds
|
||||
patch -p1 < $($(package)_patch_dir)/disable_zlib.patch
|
||||
endef
|
||||
|
||||
define $(package)_build_cmds
|
||||
CC=$(clang_prog) CXX=$(clangxx_prog) INSTALLPREFIX=$($(package)_staging_prefix_dir) ./build.sh
|
||||
endef
|
||||
|
||||
define $(package)_stage_cmds
|
||||
./install.sh
|
||||
endef
|
||||
@@ -16,9 +16,14 @@ define $(package)_stage_cmds
|
||||
mkdir -p $($(package)_staging_prefix_dir)/include/llvm-c && \
|
||||
cp bin/clang $($(package)_staging_prefix_dir)/bin/ && \
|
||||
cp -P bin/clang++ $($(package)_staging_prefix_dir)/bin/ && \
|
||||
cp bin/dsymutil $($(package)_staging_prefix_dir)/bin/$(host)-dsymutil && \
|
||||
cp bin/dsymutil $($(package)_staging_prefix_dir)/bin/dsymutil && \
|
||||
cp bin/ld64.lld $($(package)_staging_prefix_dir)/bin/ld64.lld && \
|
||||
cp bin/llvm-ar $($(package)_staging_prefix_dir)/bin/llvm-ar && \
|
||||
cp bin/llvm-config $($(package)_staging_prefix_dir)/bin/ && \
|
||||
cp bin/llvm-objdump $($(package)_staging_prefix_dir)/bin/$(host)-objdump && \
|
||||
cp bin/llvm-nm $($(package)_staging_prefix_dir)/bin/llvm-nm && \
|
||||
cp bin/llvm-objdump $($(package)_staging_prefix_dir)/bin/llvm-objdump && \
|
||||
cp bin/llvm-ranlib $($(package)_staging_prefix_dir)/bin/llvm-ranlib && \
|
||||
cp bin/llvm-strip $($(package)_staging_prefix_dir)/bin/llvm-strip && \
|
||||
cp include/llvm-c/ExternC.h $($(package)_staging_prefix_dir)/include/llvm-c && \
|
||||
cp include/llvm-c/lto.h $($(package)_staging_prefix_dir)/include/llvm-c && \
|
||||
cp lib/libLTO.so $($(package)_staging_prefix_dir)/lib/ && \
|
||||
|
||||
@@ -30,7 +30,6 @@ usdt_linux_packages=systemtap
|
||||
darwin_native_packages =
|
||||
|
||||
ifneq ($(build_os),darwin)
|
||||
darwin_native_packages += native_cctools native_libtapi
|
||||
|
||||
ifeq ($(strip $(FORCE_USE_SYSTEM_CLANG)),)
|
||||
darwin_native_packages+= native_llvm
|
||||
|
||||
@@ -15,6 +15,7 @@ $(package)_patches += no-xlib.patch
|
||||
$(package)_patches += fix_android_jni_static.patch
|
||||
$(package)_patches += dont_hardcode_pwd.patch
|
||||
$(package)_patches += qtbase-moc-ignore-gcc-macro.patch
|
||||
$(package)_patches += no_warnings_for_symbols.patch
|
||||
$(package)_patches += rcc_hardcode_timestamp.patch
|
||||
$(package)_patches += duplicate_lcqpafonts.patch
|
||||
$(package)_patches += guix_cross_lib_path.patch
|
||||
@@ -138,7 +139,7 @@ ifneq ($(build_os),darwin)
|
||||
$(package)_config_opts_darwin += -xplatform macx-clang-linux
|
||||
$(package)_config_opts_darwin += -device-option MAC_SDK_PATH=$(OSX_SDK)
|
||||
$(package)_config_opts_darwin += -device-option MAC_SDK_VERSION=$(OSX_SDK_VERSION)
|
||||
$(package)_config_opts_darwin += -device-option CROSS_COMPILE="$(host)-"
|
||||
$(package)_config_opts_darwin += -device-option CROSS_COMPILE="llvm-"
|
||||
$(package)_config_opts_darwin += -device-option MAC_TARGET=$(host)
|
||||
$(package)_config_opts_darwin += -device-option XCODE_VERSION=$(XCODE_VERSION)
|
||||
endif
|
||||
@@ -247,6 +248,7 @@ define $(package)_preprocess_cmds
|
||||
patch -p1 -i $($(package)_patch_dir)/no-xlib.patch && \
|
||||
patch -p1 -i $($(package)_patch_dir)/qtbase-moc-ignore-gcc-macro.patch && \
|
||||
patch -p1 -i $($(package)_patch_dir)/memory_resource.patch && \
|
||||
patch -p1 -i $($(package)_patch_dir)/no_warnings_for_symbols.patch && \
|
||||
patch -p1 -i $($(package)_patch_dir)/rcc_hardcode_timestamp.patch && \
|
||||
patch -p1 -i $($(package)_patch_dir)/duplicate_lcqpafonts.patch && \
|
||||
patch -p1 -i $($(package)_patch_dir)/utc_from_string_no_optimize.patch && \
|
||||
|
||||
Reference in new issue
Block a user