diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 41e58d9..d164fb1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -228,6 +228,7 @@ jobs: sys: - mingw32 - mingw64 + - clang64 - ucrt64 defaults: run: diff --git a/CMakeLists.txt b/CMakeLists.txt index 1562eba..d1baf64 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -131,8 +131,11 @@ if(BUILD_QJS_LIBC) endif() list(APPEND qjs_defines _GNU_SOURCE) list(APPEND qjs_libs qjs m) -if(NOT MINGW) - list(APPEND qjs_libs dl pthread) +if(NOT WIN32) + list(APPEND qjs_libs dl) +endif() +if(NOT MSVC) + list(APPEND qjs_libs pthread) endif() add_library(qjs ${qjs_sources}) diff --git a/qjs.c b/qjs.c index 5c52368..2912d1a 100644 --- a/qjs.c +++ b/qjs.c @@ -144,7 +144,7 @@ static inline size_t js_trace_malloc_usable_size(void *ptr) } static void -#ifdef _WIN32 +#if defined(_WIN32) && !defined(__clang__) /* mingw printf is used */ __attribute__((format(gnu_printf, 2, 3))) #else