[llvm] [Bazel] Enable LLVM threading on Windows (PR #218183)

Corentin Kerisit via llvm-commits llvm-commits at lists.llvm.org
Sat Aug 22 20:08:46 PDT 2026


https://github.com/cerisier created https://github.com/llvm/llvm-project/pull/218183

LLVM_ENABLE_THREADS defaults to ON in CMake and is disabled only on non-Windows systems without pthread support. The Bazel overlay omitted the macro on Windows, causing Support, ORC, JITLink, and parallel algorithms to compile their disabled paths. Define LLVM_ENABLE_THREADS=1 for Windows so MSVC, clang-cl, and MinGW match the supported LLVM Windows configuration without changing POSIX or Emscripten builds.

>From 3a1232f3c1bf87b40c23e882b092d90128655768 Mon Sep 17 00:00:00 2001
From: Corentin Kerisit <corentin.kerisit at gmail.com>
Date: Sun, 23 Aug 2026 01:32:34 +0900
Subject: [PATCH] [Bazel] Enable LLVM threading on Windows

---
 utils/bazel/llvm-project-overlay/llvm/config.bzl | 1 +
 1 file changed, 1 insertion(+)

diff --git a/utils/bazel/llvm-project-overlay/llvm/config.bzl b/utils/bazel/llvm-project-overlay/llvm/config.bzl
index 49f70f95d2c79..e9dbd8d1d82ef 100644
--- a/utils/bazel/llvm-project-overlay/llvm/config.bzl
+++ b/utils/bazel/llvm-project-overlay/llvm/config.bzl
@@ -110,6 +110,7 @@ win32_defines = [
     # LLVM features
     r'LTDL_SHLIB_EXT=\".dll\"',
     r'LLVM_PLUGIN_EXT=\".dll\"',
+    "LLVM_ENABLE_THREADS=1",
 ] + fenv_defines
 
 # TODO: We should switch to platforms-based config settings to make this easier



More information about the llvm-commits mailing list