Skip to content

Commit

Permalink
Fix macos bug deleting too many files
Browse files Browse the repository at this point in the history
Since #10209 we've been noticing that on macos after running `make
clean` the `coroutine/arm64/Context.S` file is missing, causing
subsequent make calls to fail because `Context.S` is needed to build
`Context.o`.

The reason this is happening is because macos is case-insensitive so the
`.s` looks for `coroutine/arm64/Context.s` and finds
`coroutine/arm64/Context.s`. This does not happen on linux because the
filesystem is case sensitive.

I attempted to use `find` because it is case sensitive regardless of
filesystem, but it was a lot slower than `rm` since we can't pass
multiple file names the same way to `find`.

Reverting this small part of #10209 fixes the issue for macos and it
wasn't clear that those changes were strictly necessary for the rest of
the PR.
  • Loading branch information
eileencodes committed May 1, 2024
1 parent d1f14ba commit d7fa792
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions template/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -493,9 +493,8 @@ clean-local::
enc/encinit.c enc/encinit.$(OBJEXT) $(pkgconfig_DATA) \
ruby-runner.$(OBJEXT) ruby-runner.h \
|| $(NULLCMD)
@$(RM) $(ALLOBJS:.$(OBJEXT)=.bc)
@$(RM) $(ALLOBJS:.$(OBJEXT)=.i)
@$(RM) $(ALLOBJS:.$(OBJEXT)=.s)
$(Q)find . -depth \( -name '*.bc' -o -name '*.[is]' \) -delete 2> /dev/null || true
-$(Q)$(RMALL) *.dSYM

distclean-local::
$(Q)$(RM) \
Expand Down

0 comments on commit d7fa792

Please sign in to comment.