Skip to content

Commit f996b1f

Browse files
committed
[FIXME] hv: Makefile: temporarily confine common files to x86 only
The common files for now contains x86 specific code and needs refactoring. To increase parallelism, we temporarily confine the common files to x86 architecture while we tried to enable riscv architecture. As we progress, this workaround should be completely reverted in future milestones when we moved all common files to actual common scope. Tracked-On: #8782 Signed-off-by: Yifan Liu <[email protected]> Acked-by: Wang, Yu1 <[email protected]>
1 parent 4309de7 commit f996b1f

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

hypervisor/Makefile

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,16 @@ ifneq ($(CONFIG_RELEASE),y)
139139
CFLAGS += -DHV_DEBUG -DPROFILING_ON -fno-omit-frame-pointer
140140
endif
141141

142+
# FIXME: During initial development stage of riscv enabling,
143+
# we would like to first confine the common files to x86-only.
144+
# As we progress through the riscv enabling process, multi-arch
145+
# and modularization of below modules will be done per-feature.
146+
#
147+
# TODO: When a module is done refactoring, move the line out from below
148+
# if block. The block should be entirely eliminated when we've done
149+
# all the work.
150+
#
151+
ifeq ($(ARCH),x86)
142152
COMMON_C_SRCS += common/ticks.c
143153
COMMON_C_SRCS += common/delay.c
144154
COMMON_C_SRCS += common/timer.c
@@ -199,12 +209,17 @@ COMMON_C_SRCS += boot/multiboot/multiboot2.c
199209
endif
200210
COMMON_C_SRCS += boot/reloc.c
201211
COMMON_C_SRCS += hw/pci.c
212+
endif # ifeq ($(ARCH),x86)
202213

203214
COMMON_C_OBJS := $(patsubst %.c,$(HV_OBJDIR)/%.o,$(COMMON_C_SRCS))
204215

205216
COMMON_MOD = $(HV_MODDIR)/common_mod.a
206217

218+
# TODO: Remove this check when the first riscv common file
219+
# is moved out from above block
220+
ifeq ($(ARCH),x86)
207221
MODULES += $(COMMON_MOD)
222+
endif
208223

209224
ifeq ($(CONFIG_RELEASE),y)
210225
MODULES += $(LIB_RELEASE)

0 commit comments

Comments
 (0)