Skip to content

Commit

Permalink
x86emul: suppress "not built" warning for test harness'es run targets
Browse files Browse the repository at this point in the history
The run* targets can be used to test whatever the tool chain is capable
of building, as long as at least the main harness source file builds.
Don't probe the tools chain, in particular to avoid issuing the warning,
in this case. While looking into this I also noticed the wording of the
respective comment isn't quite right, which therefore gets altered at
the same time.

Signed-off-by: Jan Beulich <[email protected]>
Acked-by: Andrew Cooper <[email protected]>
  • Loading branch information
jbeulich committed Apr 3, 2020
1 parent dae7b62 commit d599739
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tools/tests/x86_emulator/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,13 @@ avx512dq-opmask-vecs := 1 2
avx512bw-opmask-vecs := 4 8

# Suppress building by default of the harness if the compiler can't deal
# with any of the extensions used. Don't alter the "run" target dependencies
# with some of the extensions used. Don't alter the "run" target dependencies
# though, as this target needs to be specified manually, and things may work
# partially even with older compilers.
TARGET-y := $(TARGET)

ifeq ($(filter run%,$(MAKECMDGOALS)),)

define simd-check-cc
TARGET-$(shell echo 'int i;' | $(CC) -x c -c -o /dev/null -m$(1) - || echo y) :=
endef
Expand All @@ -116,6 +118,8 @@ ifeq ($(TARGET-y),)
$(warning Test harness not built, use newer compiler than "$(CC)" (version $(shell $(CC) -dumpversion)) and an "{evex}" capable assembler)
endif

endif

all: $(TARGET-y)

# For AVX and later, have the compiler avoid XMM0 to widen coverage of
Expand Down

0 comments on commit d599739

Please sign in to comment.