Skip to content

Commit 00d104e

Browse files
committed
Add clang64 MinGW environment to CI
run-test262 required pthreads, so let's add that. In addition, in MinGW, clock_gettime is implemented in the pthreads library, so we want to link it too. This doesn't get us anywhere closer to building with ClangCL on Windows, but hey, another target that required some tweaking...
1 parent 0b920e7 commit 00d104e

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,7 @@ jobs:
228228
sys:
229229
- mingw32
230230
- mingw64
231+
- clang64
231232
- ucrt64
232233
defaults:
233234
run:

CMakeLists.txt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,11 @@ if(BUILD_QJS_LIBC)
131131
endif()
132132
list(APPEND qjs_defines _GNU_SOURCE)
133133
list(APPEND qjs_libs qjs m)
134-
if(NOT MINGW)
135-
list(APPEND qjs_libs dl pthread)
134+
if(NOT WIN32)
135+
list(APPEND qjs_libs dl)
136+
endif()
137+
if(NOT MSVC)
138+
list(APPEND qjs_libs pthread)
136139
endif()
137140

138141
add_library(qjs ${qjs_sources})

qjs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ static inline size_t js_trace_malloc_usable_size(void *ptr)
144144
}
145145

146146
static void
147-
#ifdef _WIN32
147+
#if defined(_WIN32) && !defined(__clang__)
148148
/* mingw printf is used */
149149
__attribute__((format(gnu_printf, 2, 3)))
150150
#else

0 commit comments

Comments
 (0)