Skip to content

Commit

Permalink
[build] Only build for arm64 on arm64 using Apple clang (default both)
Browse files Browse the repository at this point in the history
  • Loading branch information
thoni56 committed Jun 4, 2024
1 parent c4c59ac commit b6bd6cf
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -359,13 +359,13 @@ gcov:
coverage-report:
# We create separate coverage files for each test to be able to run them in parallel (see ../tests/Makefile)
ifeq ($(HAVE_GCOV_TOOL),yes)
# Then we can merge all .gcda for all tests into the .gcda in OBJDIR using it, which is very fast!
# Then we can merge all .gcda for all tests into the .gcda in OBJDIR using it, which is very fast!
echo "Merge all generated .gcda using $(GCOV_TOOL)"
-for tc in ../tests/*/.coverage ; do $(GCOV_TOOL) merge $$tc $(OBJDIR) -o $(OBJDIR) ; done
# And then create .gcov for Emacs cov-mode
# And then create .gcov for Emacs cov-mode
$(MAKE) gcov
else
# We need to collect all coverage before we can generate gcov...
# We need to collect all coverage before we can generate gcov...
endif
@echo Doing the actual reporting in the background...
$(MAKE) the-actual-coverage-report &
Expand Down Expand Up @@ -455,9 +455,10 @@ endif

ifeq ($(OS),Darwin)
ifeq ($(shell arch),arm64)
# And for Homebrew on M1
# And for Homebrew on arm we just build for that
CGREEN_LIB = -L/opt/homebrew/lib -lcgreen
DYLD_PATH = DYLD_LIBRARY_PATH=/opt/homebrew/lib
CFLAGS += -arch arm64
else
CGREEN_LIB = -L/usr/local/lib -lcgreen
DYLD_PATH = DYLD_LIBRARY_PATH=/usr/local/lib
Expand Down

0 comments on commit b6bd6cf

Please sign in to comment.