Skip to content

Commit a568e32

Browse files
authored
Merge pull request #494 from visitorckw/fix-gdbstub-build
Fix gdbstub dependency and enable parallel compilation for faster CI
2 parents 8939a82 + b4a2d77 commit a568e32

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

.github/workflows/main.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949
sudo ./llvm.sh 17
5050
shell: bash
5151
- name: default build
52-
run: make
52+
run: make -j$(nproc)
5353
- name: check + tests
5454
run: |
5555
make check -j$(nproc)
@@ -65,7 +65,7 @@ jobs:
6565
make distclean && make ENABLE_SDL=0 check -j$(nproc)
6666
- name: gdbstub test
6767
run: |
68-
make distclean ENABLE_GDBSTUB=1 gdbstub-test
68+
make distclean && make ENABLE_GDBSTUB=1 gdbstub-test -j$(nproc)
6969
- name: JIT test
7070
run: |
7171
make ENABLE_JIT=1 clean && make ENABLE_JIT=1 check -j$(nproc)

Makefile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,6 @@ src/mini-gdbstub/Makefile:
124124
GDBSTUB_LIB := $(GDBSTUB_OUT)/libgdbstub.a
125125
$(GDBSTUB_LIB): src/mini-gdbstub/Makefile
126126
$(MAKE) -C $(dir $<) O=$(dir $@)
127-
# FIXME: track gdbstub dependency properly
128-
$(OUT)/decode.o: $(GDBSTUB_LIB)
129127
OBJS_EXT += gdbstub.o breakpoint.o
130128
CFLAGS += -D'GDBSTUB_COMM="$(GDBSTUB_COMM)"'
131129
LDFLAGS += $(GDBSTUB_LIB) -pthread
@@ -219,6 +217,10 @@ ifeq ($(call has, EXT_F), 1)
219217
$(OBJS): $(SOFTFLOAT_LIB)
220218
endif
221219

220+
ifeq ($(call has, GDBSTUB), 1)
221+
$(OBJS): $(GDBSTUB_LIB)
222+
endif
223+
222224
$(OUT)/%.o: src/%.c $(deps_emcc)
223225
$(VECHO) " CC\t$@\n"
224226
$(Q)$(CC) -o $@ $(CFLAGS) $(CFLAGS_emcc) -c -MMD -MF $@.d $<

0 commit comments

Comments
 (0)