From 8f3239ed7c5d94e1e4345a0db9a3eaca3f96a2b0 Mon Sep 17 00:00:00 2001 From: KxD-Work Date: Wed, 7 Jan 2026 12:46:48 -0400 Subject: [PATCH] fix compiler flags for msvc clang --- shared.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/shared.h b/shared.h index 58848f7b..ef3038ff 100644 --- a/shared.h +++ b/shared.h @@ -11,7 +11,11 @@ // TODO: we should test on C++ compilers too #if defined(_MSC_VER) -# define nob_cc_flags(cmd) cmd_append(cmd, "/W4", "/nologo", "/D_CRT_SECURE_NO_WARNINGS", "-I.") +# if !defined(__clang__) +# define nob_cc_flags(cmd) cmd_append(cmd, "/W4", "/nologo", "/D_CRT_SECURE_NO_WARNINGS", "-I.") +# else +# define nob_cc_flags(cmd) cmd_append(cmd, "-Wall", "-Wextra", "-Wswitch-enum", "-std=c99", "-g", "-D_CRT_SECURE_NO_WARNINGS", "-I.") +# endif #elif defined(__APPLE__) || defined(__MACH__) // TODO: "-std=c99", "-D_POSIX_C_SOURCE=200112L" didn't work for MacOS, don't know why, don't really care that much at the moment. // Anybody who does feel free to investigate.