Skip to content

[FMV][AArch64] Skip test aarch64-init-cpu-features if runtime unavailable #270

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions SingleSource/Benchmarks/Misc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,25 @@ RUNTIMELIMIT:=10800
endif
endif

ifeq ($(ARCH),AArch64)
ifeq ($(TARGET_OS),Darwin)
SYMBOL = __init_cpu_features_resolver
endif
ifeq ($(TARGET_OS),Linux)
SYMBOL = __init_cpu_features
endif
SYMBOL := $(shell echo "extern void $(SYMBOL)(void); void (*p)() = $(SYMBOL); int main() {}" | \
$(TARGET_LLVMGCC) --rtlib=compiler-rt -x c - -o /dev/null 2>/dev/null && \
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure whether $(TARGET_LLVMGCC) is the right compiler. Also whether --rtlib=compiler-rt should be inferred from the existing CFLAGS

echo $(SYMBOL) || echo undefined)
ifeq ($(SYMBOL),__init_cpu_features_resolver)
CFLAGS += --rtlib=compiler-rt -DHAS_DARWIN_FMV
endif
ifeq ($(SYMBOL),__init_cpu_features)
CFLAGS += --rtlib=compiler-rt -DHAS_LINUX_FMV
endif
ifeq ($(SYMBOL),undefined)
PROGRAMS_TO_SKIP := aarch64-init-cpu-features
endif
endif

include $(LEVEL)/SingleSource/Makefile.singlesrc