Skip to content

Commit

Permalink
[Make] remove BINARYBUILDER_LLVM_ASSERTS and use LLVM_ASSERTIONS instead
Browse files Browse the repository at this point in the history
  • Loading branch information
vchuravy committed Dec 17, 2020
1 parent 8a84395 commit 3a1dd42
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 15 deletions.
10 changes: 0 additions & 10 deletions Make.inc
Original file line number Diff line number Diff line change
Expand Up @@ -450,10 +450,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)
Expand Down Expand Up @@ -1190,12 +1186,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
Expand Down
2 changes: 1 addition & 1 deletion deps/Versions.make
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ LIBUV_JLL_NAME := LibUV
LLVM_VER := 11.0.0
LLVM_JLL_NAME := libLLVM
# 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_VER := 11.0.0+4
LLVM_JLL_DOWNLOAD_NAME := libLLVM_assert
endif
Expand Down
2 changes: 1 addition & 1 deletion src/debuginfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -973,10 +973,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) {
Expand Down
4 changes: 1 addition & 3 deletions src/jitlayers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -504,9 +504,7 @@ void JuliaOJIT::DebugObjectRegistrar::registerObject(RTDyldObjHandleT H, const O
continue;
if (!(Flags & object::BasicSymbolRef::SF_Exported))
continue;
auto NameOrError = Symbol.getName();
assert(NameOrError);
auto Name = NameOrError.get();
auto Name = cantFail(Symbol.getName());
auto Sym = JIT.CompileLayer.findSymbolIn(H, Name.str(), true);
assert(Sym);
// note: calling getAddress here eagerly finalizes H
Expand Down

0 comments on commit 3a1dd42

Please sign in to comment.