From 0fe4d277968f54ca09e2d2dd91ad398d6b07ed08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mos=C3=A8=20Giordano?= Date: Tue, 3 May 2022 23:59:24 +0100 Subject: [PATCH] [deps] Remove Python workaround in LLVM build, no longer necessary --- deps/llvm.mk | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) diff --git a/deps/llvm.mk b/deps/llvm.mk index 143e455e1e037..e0512137da924 100644 --- a/deps/llvm.mk +++ b/deps/llvm.mk @@ -194,16 +194,6 @@ ifeq ($(BUILD_LLDB),0) LLVM_CMAKE += -DLLVM_TOOL_LLDB_BUILD=OFF endif -# LLDB still relies on plenty of python 2.x infrastructure, without checking -llvm_python_location=$(shell /usr/bin/env python2 -c 'import sys; print(sys.executable)') -llvm_python_workaround=$(SRCCACHE)/python2_path -$(llvm_python_workaround): - mkdir -p $@ - -python -c 'import sys; sys.exit(not sys.version_info > (3, 0))' && \ - /usr/bin/env python2 -c 'import sys; sys.exit(not sys.version_info < (3, 0))' && \ - ln -sf $(llvm_python_location) "$@/python" && \ - ln -sf $(llvm_python_location)-config "$@/python-config" - LLVM_CMAKE += -DCMAKE_EXE_LINKER_FLAGS="$(LLVM_LDFLAGS)" \ -DCMAKE_SHARED_LINKER_FLAGS="$(LLVM_LDFLAGS)" @@ -242,32 +232,27 @@ endif # declare that all patches must be applied before running ./configure $(LLVM_BUILDDIR_withtype)/build-configured: | $(LLVM_PATCH_PREV) -$(LLVM_BUILDDIR_withtype)/build-configured: $(SRCCACHE)/$(LLVM_SRC_DIR)/source-extracted | $(llvm_python_workaround) +$(LLVM_BUILDDIR_withtype)/build-configured: $(SRCCACHE)/$(LLVM_SRC_DIR)/source-extracted mkdir -p $(dir $@) cd $(dir $@) && \ - export PATH=$(llvm_python_workaround):"$$PATH" && \ $(CMAKE) $(SRCCACHE)/$(LLVM_SRC_DIR)/llvm $(CMAKE_GENERATOR_COMMAND) $(CMAKE_COMMON) $(LLVM_CMAKE) \ || { echo '*** To install a newer version of cmake, run contrib/download_cmake.sh ***' && false; } echo 1 > $@ -$(LLVM_BUILDDIR_withtype)/build-compiled: $(LLVM_BUILDDIR_withtype)/build-configured | $(llvm_python_workaround) +$(LLVM_BUILDDIR_withtype)/build-compiled: $(LLVM_BUILDDIR_withtype)/build-configured cd $(LLVM_BUILDDIR_withtype) && \ - export PATH=$(llvm_python_workaround):"$$PATH" && \ $(if $(filter $(CMAKE_GENERATOR),make), \ $(MAKE), \ $(CMAKE) --build .) echo 1 > $@ -$(LLVM_BUILDDIR_withtype)/build-checked: $(LLVM_BUILDDIR_withtype)/build-compiled | $(llvm_python_workaround) +$(LLVM_BUILDDIR_withtype)/build-checked: $(LLVM_BUILDDIR_withtype)/build-compiled ifeq ($(OS),$(BUILD_OS)) cd $(LLVM_BUILDDIR_withtype) && \ - export PATH=$(llvm_python_workaround):"$$PATH" && \ $(CMAKE) --build . --target check endif echo 1 > $@ -$(build_prefix)/manifest/llvm: | $(llvm_python_workaround) - LLVM_INSTALL = \ cd $1 && mkdir -p $2$$(build_depsbindir) && \ cp -r $$(SRCCACHE)/$$(LLVM_SRC_DIR)/llvm/utils/lit $2$$(build_depsbindir)/ && \