mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-10 05:57:59 +01:00
cctools: fixup building with LTO
Use lto.h from clang+llvm not libtapi. The later is older, and comes bundled with the libtapi repo. Copy libLTO.so when building with FORCE_USE_SYSTEM_CLANG.
This commit is contained in:
@@ -16,9 +16,17 @@ define $(package)_set_vars
|
||||
$(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/ && \
|
||||
cp -f $(BASEDIR)/config.guess $(BASEDIR)/config.sub cctools
|
||||
endef
|
||||
else
|
||||
define $(package)_preprocess_cmds
|
||||
cp -f $(BASEDIR)/config.guess $(BASEDIR)/config.sub cctools
|
||||
endef
|
||||
endif
|
||||
|
||||
define $(package)_config_cmds
|
||||
$($(package)_autoconf)
|
||||
|
||||
@@ -16,10 +16,13 @@ endef
|
||||
define $(package)_stage_cmds
|
||||
mkdir -p $($(package)_staging_prefix_dir)/lib/clang/$($(package)_version)/include && \
|
||||
mkdir -p $($(package)_staging_prefix_dir)/bin && \
|
||||
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/llvm-config $($(package)_staging_prefix_dir)/bin/ && \
|
||||
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/ && \
|
||||
cp -r lib/clang/$($(package)_version)/include/* $($(package)_staging_prefix_dir)/lib/clang/$($(package)_version)/include/
|
||||
endef
|
||||
|
||||
@@ -13,7 +13,5 @@ define $(package)_build_cmds
|
||||
endef
|
||||
|
||||
define $(package)_stage_cmds
|
||||
./install.sh && \
|
||||
mkdir -p $($(package)_staging_prefix_dir)/include/llvm-c && \
|
||||
cp src/llvm/include/llvm-c/lto.h $($(package)_staging_prefix_dir)/include/llvm-c
|
||||
./install.sh
|
||||
endef
|
||||
|
||||
Reference in New Issue
Block a user