From 29ff1b71c61af25ea48e7b88f86cb0bfa2765e6e Mon Sep 17 00:00:00 2001 From: Valentin Churavy Date: Tue, 8 Dec 2020 12:31:02 -0500 Subject: [PATCH] [Make] remove BINARYBUILDER_LLVM_ASSERTS and use LLVM_ASSERTIONS instead --- Make.inc | 10 ---------- contrib/refresh_checksums.mk | 2 +- deps/llvm.mk | 2 +- src/debuginfo.cpp | 2 +- 4 files changed, 3 insertions(+), 13 deletions(-) diff --git a/Make.inc b/Make.inc index 30b454a6a103b..f272bedca956c 100644 --- a/Make.inc +++ b/Make.inc @@ -454,10 +454,6 @@ CXX_DISABLE_ASSERTION := -DJL_NDEBUG DISABLE_ASSERTIONS := -DNDEBUG -DJL_NDEBUG endif -ifeq ($(LLVM_ASSERTIONS),0) -CXX_DISABLE_ASSERTION += -DNDEBUG -endif - # Compiler specific stuff ifeq ($(USEMSVC), 1) @@ -1200,12 +1196,6 @@ endef $(foreach proj,$(BB_PROJECTS),$(eval $(call SET_BB_DEFAULT,$(proj)))) - -# Use the Assertions build -BINARYBUILDER_LLVM_ASSERTS ?= 0 - - - # OS specific stuff # install_name_tool diff --git a/contrib/refresh_checksums.mk b/contrib/refresh_checksums.mk index 3fddb7a66423f..38db1549e13e9 100644 --- a/contrib/refresh_checksums.mk +++ b/contrib/refresh_checksums.mk @@ -39,7 +39,7 @@ endef # If $(2) == `src`, this will generate a `USE_BINARYBUILDER_FOO=0` make flag # It will also generate a `FOO_BB_TRIPLET=$(2)` make flag. define make_flags -USE_BINARYBUILDER=$(if $(filter src,$(2)),0,1) $(call makevar,$(1))_BB_TRIPLET=$(if $(filter src,$(2)),,$(2)) BINARYBUILDER_LLVM_ASSERTS=$(if $(filter assert,$(3)),1,0) DEPS_GIT=0 +USE_BINARYBUILDER=$(if $(filter src,$(2)),0,1) $(call makevar,$(1))_BB_TRIPLET=$(if $(filter src,$(2)),,$(2)) LLVM_ASSERTIONS=$(if $(filter assert,$(3)),1,0) DEPS_GIT=0 endef # checksum_bb_dep takes in (name, triplet), and generates a `checksum-$(1)-$(2)` target. diff --git a/deps/llvm.mk b/deps/llvm.mk index 96a9812441ad1..729e7867565fd 100644 --- a/deps/llvm.mk +++ b/deps/llvm.mk @@ -632,7 +632,7 @@ endif else # USE_BINARYBUILDER_LLVM # We provide a way to subversively swap out which LLVM JLL we pull artifacts from -ifeq ($(BINARYBUILDER_LLVM_ASSERTS), 1) +ifeq ($(LLVM_ASSERTIONS), 1) LLVM_JLL_DOWNLOAD_NAME := libLLVM_assert LLVM_JLL_VER := $(LLVM_ASSERT_JLL_VER) endif diff --git a/src/debuginfo.cpp b/src/debuginfo.cpp index 6e93d85e73ab1..cc7993390e0ee 100644 --- a/src/debuginfo.cpp +++ b/src/debuginfo.cpp @@ -974,10 +974,10 @@ static objfileentry_t &find_object_file(uint64_t fbase, StringRef fname) JL_NOTS DebugInfo(errorCodeToError(std::make_error_code(std::errc::no_such_file_or_directory))); // Can't find a way to construct an empty Expected object // that can be ignored. - ignoreError(DebugInfo); if (fname.substr(sep + 1) != info.filename) { debuginfopath = fname.substr(0, sep + 1).str(); debuginfopath += info.filename; + ignoreError(DebugInfo); DebugInfo = openDebugInfo(debuginfopath, info); } if (!DebugInfo) {