mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-17 13:07:54 +02:00
Merge 08085c764d into merged_master (Bitcoin PR bitcoin/bitcoin#25633)
This commit is contained in:
commit
2f66221f46
4 changed files with 17 additions and 7 deletions
|
|
@ -17,6 +17,7 @@ darwin_native_toolchain=native_cctools
|
|||
|
||||
clang_prog=$(build_prefix)/bin/clang
|
||||
clangxx_prog=$(clang_prog)++
|
||||
llvm_config_prog=$(build_prefix)/bin/llvm-config
|
||||
|
||||
clang_resource_dir=$(build_prefix)/lib/clang/$(native_clang_version)
|
||||
else
|
||||
|
|
@ -34,8 +35,10 @@ darwin_native_toolchain=
|
|||
# Source: https://lists.gnu.org/archive/html/bug-make/2017-11/msg00017.html
|
||||
clang_prog=$(shell $(SHELL) $(.SHELLFLAGS) "command -v clang")
|
||||
clangxx_prog=$(shell $(SHELL) $(.SHELLFLAGS) "command -v clang++")
|
||||
llvm_config_prog=$(shell $(SHELL) $(.SHELLFLAGS) "command -v llvm-config")
|
||||
|
||||
clang_resource_dir=$(shell clang -print-resource-dir)
|
||||
llvm_lib_dir=$(shell $(llvm_config_prog) --libdir)
|
||||
endif
|
||||
|
||||
cctools_TOOLS=AR RANLIB STRIP NM LIBTOOL OTOOL INSTALL_NAME_TOOL DSYMUTIL
|
||||
|
|
|
|||
|
|
@ -7,18 +7,24 @@ $(package)_build_subdir=cctools
|
|||
$(package)_dependencies=native_libtapi
|
||||
|
||||
define $(package)_set_vars
|
||||
$(package)_config_opts=--target=$(host)
|
||||
$(package)_config_opts=--target=$(host) --enable-lto-support
|
||||
$(package)_config_opts+=--with-llvm-config=$(llvm_config_prog)
|
||||
$(package)_ldflags+=-Wl,-rpath=\\$$$$$$$$\$$$$$$$$ORIGIN/../lib
|
||||
ifeq ($(strip $(FORCE_USE_SYSTEM_CLANG)),)
|
||||
$(package)_config_opts+=--enable-lto-support --with-llvm-config=$(build_prefix)/bin/llvm-config
|
||||
endif
|
||||
$(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/ && \
|
||||
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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue