From b91fede6d263286fa1e20d424f92d1e10668a8ed Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Mon, 15 Sep 2025 10:28:12 +0200 Subject: compilers: clang: map -Db_vscrt to -fms-runtime-lib The main complication here is that passing -fms-runtime-lib during compilation results in a warning: clang: error: argument unused during compilation: '-fms-runtime-lib=dll' [-Werror,-Wunused-command-line-argument] (https://github.com/mesonbuild/meson/actions/runs/17727020048/job/50369771571). So, for compilation expand the -D flags by hand, and only pass -fms-runtime-lib when linking. Fixes: #14571 Signed-off-by: Paolo Bonzini --- docs/markdown/snippets/b_msvcrt_clang.md | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 docs/markdown/snippets/b_msvcrt_clang.md (limited to 'docs/markdown') diff --git a/docs/markdown/snippets/b_msvcrt_clang.md b/docs/markdown/snippets/b_msvcrt_clang.md new file mode 100644 index 000000000..2a509bda6 --- /dev/null +++ b/docs/markdown/snippets/b_msvcrt_clang.md @@ -0,0 +1,4 @@ +## `-Db_msvcrt` on clang + +`-Db_msvcrt` will now link the appropriate runtime library, and set +the appropriate preprocessor symbols, also when the compiler is clang. -- cgit v1.2.3