Skip to content

Commit 5bd7636

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 4a38e79 commit 5bd7636

File tree

2 files changed

+31
-5
lines changed

2 files changed

+31
-5
lines changed

Make.inc

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -980,7 +980,7 @@ else
980980
endif
981981

982982
# BinaryBuilder options. We default to "on" for all the projects listed in BB_PROJECTS,
983-
# but only if contrib/normalize_triplet.py works for our requested triplet
983+
# but only if contrib/normalize_triplet.py works for our requested triplet.
984984
ifeq ($(shell python $(JULIAHOME)/contrib/normalize_triplet.py $(or $(XC_HOST),$(XC_HOST),$(BUILD_MACHINE)) >/dev/null 2>/dev/null; echo $$?),0)
985985
USE_BINARYBUILDER ?= 1
986986
else
@@ -991,8 +991,34 @@ USE_BINARYBUILDER ?= 0
991991
endif
992992

993993
# This is the set of projects that BinaryBuilder dependencies are hooked up for.
994-
BB_PROJECTS := OPENBLAS LLVM SUITESPARSE OPENLIBM GMP MBEDTLS LIBSSH2 MPFR CURL LIBGIT2 PCRE LIBUV UNWIND DSFMT OBJCONV
995-
$(foreach proj,$(BB_PROJECTS),$(if $(USE_BINARYBUILDER_$(proj)),,$(eval USE_BINARYBUILDER_$(proj) ?= $(USE_BINARYBUILDER))))
994+
BB_PROJECTS := OPENBLAS LLVM SUITESPARSE OPENLIBM GMP MBEDTLS LIBSSH2 MPFR CURL LIBGIT2 PCRE LIBUV LIBUNWIND DSFMT OBJCONV
995+
define SET_BB_DEFAULT
996+
# First, check to see if BB is disabled on a global setting
997+
ifeq ($$(USE_BINARYBUILDER),0)
998+
USE_BINARYBUILDER_$(1) ?= 0
999+
else
1000+
# If it's not, check to see if it's disabled by a USE_SYSTEM_xxx flag
1001+
ifeq ($$(USE_SYSTEM_$(1)),1)
1002+
USE_BINARYBUILDER_$(1) ?= 0
1003+
else
1004+
USE_BINARYBUILDER_$(1) ?= 1
1005+
endif
1006+
endif
1007+
endef
1008+
$(foreach proj,$(BB_PROJECTS),$(eval $(call SET_BB_DEFAULT,$(proj))))
1009+
1010+
# Some special restrictions on BB usage:
1011+
ifeq ($(USE_SYSTEM_BLAS),1)
1012+
# Since the names don't line up (`BLAS` vs. `OPENBLAS`), manually gate:
1013+
USE_BINARYBUILDER_OPENBLAS ?= 0
1014+
# Disable BB SuiteSparse if we're using system BLAS
1015+
USE_BINARYBUILDER_SUITESPARSE ?= 0
1016+
endif
1017+
1018+
ifeq ($(USE_SYSTEM_LIBM),1)
1019+
# If we're using system libm, disable BB OpenLibm
1020+
USE_BINARYBUILDER_OPENLIBM ?= 0
1021+
endif
9961022

9971023
# Use the Assertions build
9981024
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)