From 3a187261701c3f3730fe78709ef61d190e02deff Mon Sep 17 00:00:00 2001 From: tobtoht Date: Tue, 27 Jun 2023 23:33:15 +0200 Subject: [PATCH] depends: remove native_clang --- contrib/depends/builders/darwin.mk | 30 ---------------------- contrib/depends/hosts/darwin.mk | 15 ----------- contrib/depends/packages/native_cctools.mk | 3 --- contrib/depends/packages/native_clang.mk | 25 ------------------ contrib/depends/packages/native_libtapi.mk | 4 --- contrib/depends/packages/packages.mk | 2 +- contrib/guix/libexec/build.sh | 1 - 7 files changed, 1 insertion(+), 79 deletions(-) delete mode 100644 contrib/depends/builders/darwin.mk delete mode 100644 contrib/depends/packages/native_clang.mk diff --git a/contrib/depends/builders/darwin.mk b/contrib/depends/builders/darwin.mk deleted file mode 100644 index 8ed82b2..0000000 --- a/contrib/depends/builders/darwin.mk +++ /dev/null @@ -1,30 +0,0 @@ -build_darwin_CC:=$(shell xcrun -f clang) -isysroot$(shell xcrun --show-sdk-path) -build_darwin_CXX:=$(shell xcrun -f clang++) -isysroot$(shell xcrun --show-sdk-path) -build_darwin_AR:=$(shell xcrun -f ar) -build_darwin_RANLIB:=$(shell xcrun -f ranlib) -build_darwin_STRIP:=$(shell xcrun -f strip) -build_darwin_OTOOL:=$(shell xcrun -f otool) -build_darwin_NM:=$(shell xcrun -f nm) -build_darwin_INSTALL_NAME_TOOL:=$(shell xcrun -f install_name_tool) -build_darwin_DSYMUTIL:=$(shell xcrun -f dsymutil) -build_darwin_SHA256SUM=shasum -a 256 -build_darwin_DOWNLOAD=curl --location --fail --connect-timeout $(DOWNLOAD_CONNECT_TIMEOUT) --retry $(DOWNLOAD_RETRIES) -o - -#darwin host on darwin builder. overrides darwin host preferences. -darwin_CC=$(shell xcrun -f clang) -mmacosx-version-min=$(OSX_MIN_VERSION) -isysroot$(shell xcrun --show-sdk-path) -darwin_CXX:=$(shell xcrun -f clang++) -mmacosx-version-min=$(OSX_MIN_VERSION) -stdlib=libc++ -isysroot$(shell xcrun --show-sdk-path) -darwin_AR:=$(shell xcrun -f ar) -darwin_RANLIB:=$(shell xcrun -f ranlib) -darwin_STRIP:=$(shell xcrun -f strip) -darwin_LIBTOOL:=$(shell xcrun -f libtool) -darwin_OTOOL:=$(shell xcrun -f otool) -darwin_NM:=$(shell xcrun -f nm) -darwin_INSTALL_NAME_TOOL:=$(shell xcrun -f install_name_tool) -darwin_DSYMUTIL:=$(shell xcrun -f dsymutil) -darwin_native_binutils= -darwin_native_toolchain= - -x86_64_darwin_CFLAGS += -arch x86_64 -x86_64_darwin_CXXFLAGS += -arch x86_64 -aarch64_darwin_CFLAGS += -arch arm64 -aarch64_darwin_CXXFLAGS += -arch arm64 diff --git a/contrib/depends/hosts/darwin.mk b/contrib/depends/hosts/darwin.mk index 96949cf..2b280bc 100644 --- a/contrib/depends/hosts/darwin.mk +++ b/contrib/depends/hosts/darwin.mk @@ -8,20 +8,6 @@ OSX_SDK=$(host_prefix)/native/SDK darwin_native_binutils=native_cctools -ifeq ($(strip $(FORCE_USE_SYSTEM_CLANG)),) -# FORCE_USE_SYSTEM_CLANG is empty, so we use our depends-managed, pinned clang -# from llvm.org - -# Clang is a dependency of native_cctools when FORCE_USE_SYSTEM_CLANG is empty -darwin_native_toolchain=native_cctools darwin_sdk - -clang_prog=$(build_prefix)/bin/clang -clangxx_prog=$(clang_prog)++ - -else -# FORCE_USE_SYSTEM_CLANG is non-empty, so we use the clang from the user's -# system - darwin_native_toolchain=darwin_sdk # We can't just use $(shell command -v clang) because GNU Make handles builtins @@ -35,7 +21,6 @@ clang_prog=$(shell $(SHELL) $(.SHELLFLAGS) "command -v clang") clangxx_prog=$(shell $(SHELL) $(.SHELLFLAGS) "command -v clang++") clang_resource_dir=$(shell clang -print-resource-dir) -endif cctools_TOOLS=AR RANLIB STRIP NM LIBTOOL OTOOL INSTALL_NAME_TOOL DSYMUTIL diff --git a/contrib/depends/packages/native_cctools.mk b/contrib/depends/packages/native_cctools.mk index 8ebfab9..18699a4 100644 --- a/contrib/depends/packages/native_cctools.mk +++ b/contrib/depends/packages/native_cctools.mk @@ -10,9 +10,6 @@ $(package)_patches=no-build-date.patch define $(package)_set_vars $(package)_config_opts=--target=$(host) $(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 diff --git a/contrib/depends/packages/native_clang.mk b/contrib/depends/packages/native_clang.mk deleted file mode 100644 index 8a9389f..0000000 --- a/contrib/depends/packages/native_clang.mk +++ /dev/null @@ -1,25 +0,0 @@ -package=native_clang -$(package)_version=11.1.0 -$(package)_download_path=https://github.com/llvm/llvm-project/releases/download/llvmorg-$($(package)_version) -ifneq (,$(findstring aarch64,$(BUILD))) -$(package)_file_name=clang+llvm-$($(package)_version)-aarch64-linux-gnu.tar.xz -$(package)_sha256_hash=18df38247af3fba0e0e2991fb00d7e3cf3560b4d3509233a14af699ef0039e1c -else -$(package)_file_name=clang+llvm-$($(package)_version)-x86_64-linux-gnu-ubuntu-16.04.tar.xz -$(package)_sha256_hash=c691a558967fb7709fb81e0ed80d1f775f4502810236aa968b4406526b43bee1 -endif - -define $(package)_preprocess_cmds - rm -f $($(package)_extract_dir)/lib/libc++abi.so* -endef - -define $(package)_stage_cmds - mkdir -p $($(package)_staging_prefix_dir)/lib/clang/$($(package)_version)/include && \ - mkdir -p $($(package)_staging_prefix_dir)/bin && \ - 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 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 diff --git a/contrib/depends/packages/native_libtapi.mk b/contrib/depends/packages/native_libtapi.mk index 6b06aa7..9a02320 100644 --- a/contrib/depends/packages/native_libtapi.mk +++ b/contrib/depends/packages/native_libtapi.mk @@ -4,10 +4,6 @@ $(package)_download_path=https://github.com/tpoechtrager/apple-libtapi/archive $(package)_file_name=$($(package)_version).tar.gz $(package)_sha256_hash=62e419c12d1c9fad67cc1cd523132bc00db050998337c734c15bc8d73cc02b61 -ifeq ($(strip $(FORCE_USE_SYSTEM_CLANG)),) -$(package)_dependencies=native_clang -endif - define $(package)_build_cmds CC=$(clang_prog) CXX=$(clangxx_prog) INSTALLPREFIX=$($(package)_staging_prefix_dir) ./build.sh endef diff --git a/contrib/depends/packages/packages.mk b/contrib/depends/packages/packages.mk index 691bb61..d3a1731 100644 --- a/contrib/depends/packages/packages.mk +++ b/contrib/depends/packages/packages.mk @@ -5,7 +5,7 @@ linux_packages := eudev libfuse libsquashfuse zstd appimage_runtime linux_native_packages = darwin_packages := -darwin_native_packages = darwin_sdk native_cctools native_libtapi native_clang +darwin_native_packages = darwin_sdk native_cctools native_libtapi mingw32_packages = mingw32_native_packages = diff --git a/contrib/guix/libexec/build.sh b/contrib/guix/libexec/build.sh index fb3562d..d931216 100755 --- a/contrib/guix/libexec/build.sh +++ b/contrib/guix/libexec/build.sh @@ -220,7 +220,6 @@ make -C contrib/depends --jobs="$JOBS" HOST="$HOST" \ x86_64_linux_RANLIB=x86_64-linux-gnu-ranlib \ x86_64_linux_NM=x86_64-linux-gnu-nm \ x86_64_linux_STRIP=x86_64-linux-gnu-strip \ - FORCE_USE_SYSTEM_CLANG=1 \ qt_config_opts_x86_64_linux='-platform linux-g++ -xplatform linux-g++' \ guix_ldflags="$HOST_LDFLAGS"