Skip to content

Commit

Permalink
Merge pull request #494 from visitorckw/fix-gdbstub-build
Browse files Browse the repository at this point in the history
Fix gdbstub dependency and enable parallel compilation for faster CI
  • Loading branch information
jserv authored Sep 14, 2024
2 parents 8939a82 + b4a2d77 commit a568e32
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
sudo ./llvm.sh 17
shell: bash
- name: default build
run: make
run: make -j$(nproc)
- name: check + tests
run: |
make check -j$(nproc)
Expand All @@ -65,7 +65,7 @@ jobs:
make distclean && make ENABLE_SDL=0 check -j$(nproc)
- name: gdbstub test
run: |
make distclean ENABLE_GDBSTUB=1 gdbstub-test
make distclean && make ENABLE_GDBSTUB=1 gdbstub-test -j$(nproc)
- name: JIT test
run: |
make ENABLE_JIT=1 clean && make ENABLE_JIT=1 check -j$(nproc)
Expand Down
6 changes: 4 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,6 @@ src/mini-gdbstub/Makefile:
GDBSTUB_LIB := $(GDBSTUB_OUT)/libgdbstub.a
$(GDBSTUB_LIB): src/mini-gdbstub/Makefile
$(MAKE) -C $(dir $<) O=$(dir $@)
# FIXME: track gdbstub dependency properly
$(OUT)/decode.o: $(GDBSTUB_LIB)
OBJS_EXT += gdbstub.o breakpoint.o
CFLAGS += -D'GDBSTUB_COMM="$(GDBSTUB_COMM)"'
LDFLAGS += $(GDBSTUB_LIB) -pthread
Expand Down Expand Up @@ -219,6 +217,10 @@ ifeq ($(call has, EXT_F), 1)
$(OBJS): $(SOFTFLOAT_LIB)
endif

ifeq ($(call has, GDBSTUB), 1)
$(OBJS): $(GDBSTUB_LIB)
endif

$(OUT)/%.o: src/%.c $(deps_emcc)
$(VECHO) " CC\t$@\n"
$(Q)$(CC) -o $@ $(CFLAGS) $(CFLAGS_emcc) -c -MMD -MF $@.d $<
Expand Down

0 comments on commit a568e32

Please sign in to comment.