Skip to content

Commit 8a20b5d

Browse files
committed
Automatically disable USE_BINARYBUILDER_xxx when USE_SYSTEM_xxx is set
Also renames `USE_BINARYBUILDER_UNWIND` to `USE_BINARYBUILDER_LIBUNWIND` for consistency, as well as providing a little bit of dependency logic to auto-disable `USE_BINARYBUILDER_SUITESPARSE` if `USE_SYSTEM_BLAS` is set, for example.
1 parent 1c88c0e commit 8a20b5d

File tree

2 files changed

+30
-4
lines changed

2 files changed

+30
-4
lines changed

Make.inc

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -938,8 +938,34 @@ USE_BINARYBUILDER := 0
938938
endif
939939

940940
# This is the set of projects that BinaryBuilder dependencies are hooked up for.
941-
BB_PROJECTS := OPENBLAS LLVM SUITESPARSE OPENLIBM GMP MBEDTLS LIBSSH2 MPFR CURL LIBGIT2 PCRE LIBUV UNWIND
942-
$(foreach proj,$(BB_PROJECTS),$(if $(USE_BINARYBUILDER_$(proj)),,$(eval USE_BINARYBUILDER_$(proj) := $(USE_BINARYBUILDER))))
941+
BB_PROJECTS := OPENBLAS LLVM SUITESPARSE OPENLIBM GMP MBEDTLS LIBSSH2 MPFR CURL LIBGIT2 PCRE LIBUV LIBUNWIND
942+
define SET_BB_DEFAULT
943+
# First, check to see if BB is disabled on a global setting
944+
ifneq ($$(USE_BINARYBUILDER),1)
945+
USE_BINARYBUILDER_$(1) := 0
946+
else
947+
# If it's not, check to see if it's disabled by a USE_SYSTEM_xxx flag
948+
ifneq ($$(USE_SYSTEM_$(1)),0)
949+
USE_BINARYBUILDER_$(1) := 0
950+
else
951+
USE_BINARYBUILDER_$(1) := 1
952+
endif
953+
endif
954+
endef
955+
$(foreach proj,$(BB_PROJECTS),$(eval $(call SET_BB_DEFAULT,$(proj))))
956+
957+
# Some special restrictions on BB usage:
958+
ifneq ($(USE_SYSTEM_BLAS),0)
959+
# Since the names don't line up (`BLAS` vs. `OPENBLA`), manually gate:
960+
USE_BINARYBUILDER_OPENBLAS := 0
961+
# Disable BB SuiteSparse if we're using system BLAS
962+
USE_BINARYBUILDER_SUITESPARSE := 0
963+
endif
964+
965+
ifneq ($(USE_SYSTEM_LIBM),0)
966+
# If we're using system libm, disable BB OpenLibm
967+
USE_BINARYBUILDER_OPENLIBM := 0
968+
endif
943969

944970
# Use the Assertions build
945971
BINARYBUILDER_LLVM_ASSERTS := 0

deps/unwind.mk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## UNWIND ##
22

3-
ifneq ($(USE_BINARYBUILDER_UNWIND),1)
3+
ifneq ($(USE_BINARYBUILDER_LIBUNWIND),1)
44
LIBUNWIND_CFLAGS := -U_FORTIFY_SOURCE $(fPIC)
55
LIBUNWIND_CPPFLAGS :=
66

@@ -102,7 +102,7 @@ fastcheck-osxunwind: check-osxunwind
102102
check-osxunwind: compile-osxunwind
103103
install-osxunwind: $(build_prefix)/manifest/osxunwind
104104

105-
else # USE_BINARYBUILDER_UNWIND
105+
else # USE_BINARYBUILDER_LIBUNWIND
106106

107107
UNWIND_BB_URL_BASE := https://github.com/JuliaPackaging/Yggdrasil/releases/download/LibUnwind-v$(UNWIND_VER)-$(UNWIND_BB_REL)
108108
UNWIND_BB_NAME := LibUnwind.v$(UNWIND_VER)

0 commit comments

Comments
 (0)