1
1
mirror of https://github.com/rui314/mold.git synced 2024-10-04 08:37:28 +03:00

Merge pull request #673 from ksco/make

This commit is contained in:
Rui Ueyama 2022-08-28 04:07:28 -07:00 committed by GitHub
commit e54d7e9761
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 0 deletions

View File

@ -126,6 +126,8 @@ endif
DEPFLAGS = -MT $@ -MMD -MP -MF out/$*.d
MOLD_ENABLE_RV32_QEMU_TESTS = Off
all: mold mold-wrapper.so
-include $(SRCS:%.cc=out/%.d)
@ -196,6 +198,9 @@ test-all: all
$(MAKE) test-arch TRIPLE=aarch64-linux-gnu MACHINE=aarch64
$(MAKE) test-arch TRIPLE=arm-linux-gnueabihf MACHINE=arm
$(MAKE) test-arch TRIPLE=riscv64-linux-gnu MACHINE=riscv64
ifeq ($(MOLD_ENABLE_RV32_QEMU_TESTS), On)
$(MAKE) test-arch TRIPLE=riscv32-linux-gnu MACHINE=riscv32
endif
# macOS's GNU make hasn't been updated since 3.8.1 perhaps due a concern
# of GPLv3. The --output-sync flag was introduced in GNU Make 4.0, so we

View File

@ -1,4 +1,5 @@
option(MOLD_ENABLE_QEMU_TESTS "Enable tests for other targets" OFF)
option(MOLD_ENABLE_RV32_QEMU_TESTS "Enable RV32 tests for other targets" OFF)
file(GLOB TESTS
RELATIVE ${CMAKE_CURRENT_LIST_DIR}
@ -35,4 +36,8 @@ foreach(TEST IN LISTS TESTS)
add_qemu_test(${TEST} arm-linux-gnueabihf arm)
add_qemu_test(${TEST} riscv64-linux-gnu riscv64)
endif()
if (MOLD_ENABLE_RV32_QEMU_TESTS)
add_qemu_test(${TEST} riscv32-linux-gnu riscv32)
endif()
endforeach()