Skip to content

Commit

Permalink
deps: fix rule for llvm patches rebuild (JuliaLang#28377)
Browse files Browse the repository at this point in the history
Our rules were previously expecting that patches must be added to the end,
but 9803708 added a sticky patch at the end thwarting our rule.
Update the rules to avoid this being a problem.

fix JuliaLang#28337
  • Loading branch information
vtjnash authored and Keno committed Aug 1, 2018
1 parent 9a60762 commit fe9a075
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions deps/llvm.mk
Original file line number Diff line number Diff line change
Expand Up @@ -373,12 +373,14 @@ endif # LLVM_VER
touch -c $(LLVM_SRC_DIR)/CMakeLists.txt
echo 1 > $@

# Apply version-specific LLVM patches
# Apply version-specific LLVM patches sequentially
LLVM_PATCH_PREV :=
define LLVM_PATCH
$$(LLVM_SRC_DIR)/$1.patch-applied: $$(LLVM_SRC_DIR)/source-extracted | $$(SRCDIR)/patches/$1.patch $$(LLVM_PATCH_PREV)
cd $$(LLVM_SRC_DIR) && patch -p1 < $$(SRCDIR)/patches/$1.patch
echo 1 > $$@
# declare that applying any patch must re-run the compile step
$$(LLVM_BUILDDIR_withtype)/build-compiled: $$(LLVM_SRC_DIR)/$1.patch-applied
LLVM_PATCH_PREV := $$(LLVM_SRC_DIR)/$1.patch-applied
endef

Expand Down Expand Up @@ -517,7 +519,8 @@ endif
$(eval $(call LLVM_PATCH,llvm-symver-jlprefix)) # DO NOT REMOVE


$(LLVM_BUILDDIR_withtype)/build-configured: $(LLVM_PATCH_PREV)
# declare that all patches must be applied before running ./configure
$(LLVM_BUILDDIR_withtype)/build-configured: | $(LLVM_PATCH_PREV)

$(LLVM_BUILDDIR_withtype)/build-configured: $(LLVM_SRC_DIR)/source-extracted | $(llvm_python_workaround) $(LIBCXX_DEPENDENCY)
mkdir -p $(dir $@)
Expand Down

0 comments on commit fe9a075

Please sign in to comment.