From 3d512abaf7124094934aa69e9431b5684ce0dee9 Mon Sep 17 00:00:00 2001 From: Laura Kirsch Date: Tue, 27 Jan 2026 20:09:25 +0100 Subject: [PATCH] Fix non-LLVM build. --- CMakeLists.txt | 1 + src/utils/hostinfo.c | 2 +- src/utils/hostinfo.h | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d949faa3f..621738112 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -474,6 +474,7 @@ if(C3_WITH_LLVM) else() target_sources(c3c PRIVATE src/utils/hostinfo.c) target_compile_definitions(c3c PUBLIC LLVM_AVAILABLE=0) + target_link_libraries(c3c m) endif() target_include_directories(c3c PRIVATE diff --git a/src/utils/hostinfo.c b/src/utils/hostinfo.c index 78ece5edc..02bdca39a 100644 --- a/src/utils/hostinfo.c +++ b/src/utils/hostinfo.c @@ -68,7 +68,7 @@ static const char *llvm_arch_name(ArchType ty) UNREACHABLE } -void hostinfo_x86_features(X86Features *cpu_features) +void hostinfo_x86_features(CpuFeatures *cpu_features) { #if defined(__x86_64__) || defined(_M_X64) // TODO diff --git a/src/utils/hostinfo.h b/src/utils/hostinfo.h index b70ad4c56..e95256f27 100644 --- a/src/utils/hostinfo.h +++ b/src/utils/hostinfo.h @@ -1,7 +1,7 @@ #if !defined(HOSTINFO_H) && !LLVM_AVAILABLE #define HOSTINFO_H -void hostinfo_x86_features(X86Features *cpu_features); +void hostinfo_x86_features(CpuFeatures *cpu_features); ArchType hostinfo_arch_type(void); EnvironmentType hostinfo_env_type(void); OsType hostinfo_os_type(void);