Skip to content

Commit b11fcb5

Browse files
48casean-jc
authored andcommitted
KVM: selftests: Build and link selftests/cgroup/lib into KVM selftests
libcgroup.o is built separately from KVM selftests and cgroup selftests, so different compiler flags used by the different selftests will not conflict with each other. Signed-off-by: James Houghton <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Sean Christopherson <[email protected]>
1 parent 38e1dd5 commit b11fcb5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tools/testing/selftests/kvm/Makefile.kvm

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,7 @@ OVERRIDE_TARGETS = 1
205205
# importantly defines, i.e. overwrites, $(CC) (unless `make -e` or `make CC=`,
206206
# which causes the environment variable to override the makefile).
207207
include ../lib.mk
208+
include ../cgroup/lib/libcgroup.mk
208209

209210
INSTALL_HDR_PATH = $(top_srcdir)/usr
210211
LINUX_HDR_PATH = $(INSTALL_HDR_PATH)/include/
@@ -258,7 +259,7 @@ LIBKVM_S := $(filter %.S,$(LIBKVM))
258259
LIBKVM_C_OBJ := $(patsubst %.c, $(OUTPUT)/%.o, $(LIBKVM_C))
259260
LIBKVM_S_OBJ := $(patsubst %.S, $(OUTPUT)/%.o, $(LIBKVM_S))
260261
LIBKVM_STRING_OBJ := $(patsubst %.c, $(OUTPUT)/%.o, $(LIBKVM_STRING))
261-
LIBKVM_OBJS = $(LIBKVM_C_OBJ) $(LIBKVM_S_OBJ) $(LIBKVM_STRING_OBJ)
262+
LIBKVM_OBJS = $(LIBKVM_C_OBJ) $(LIBKVM_S_OBJ) $(LIBKVM_STRING_OBJ) $(LIBCGROUP_O)
262263
SPLIT_TEST_GEN_PROGS := $(patsubst %, $(OUTPUT)/%, $(SPLIT_TESTS))
263264
SPLIT_TEST_GEN_OBJ := $(patsubst %, $(OUTPUT)/$(ARCH)/%.o, $(SPLIT_TESTS))
264265

0 commit comments

Comments
 (0)