Skip to content

Commit 91a677a

Browse files
committed
ci: build LLVM with thread support on Windows
This should fix a number of concurrency/threading issues.
1 parent 47ca1c0 commit 91a677a

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

.github/workflows/windows.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949
uses: actions/cache@v3
5050
id: cache-llvm-build
5151
with:
52-
key: llvm-build-15-windows-v2
52+
key: llvm-build-15-windows-v3
5353
path: llvm-build
5454
- name: Build LLVM
5555
if: steps.cache-llvm-build.outputs.cache-hit != 'true'

Makefile

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -120,10 +120,8 @@ ifeq ($(OS),Windows_NT)
120120
START_GROUP = -Wl,--start-group
121121
END_GROUP = -Wl,--end-group
122122

123-
# LLVM compiled using MinGW on Windows appears to have problems with threads.
124-
# Without this flag, linking results in errors like these:
125-
# libLLVMSupport.a(Threading.cpp.obj):Threading.cpp:(.text+0x55): undefined reference to `std::thread::hardware_concurrency()'
126-
LLVM_OPTION += -DLLVM_ENABLE_THREADS=OFF -DLLVM_ENABLE_PIC=OFF
123+
# PIC needs to be disabled for libclang to work.
124+
LLVM_OPTION += -DLLVM_ENABLE_PIC=OFF
127125

128126
CGO_CPPFLAGS += -DCINDEX_NO_EXPORTS
129127
CGO_LDFLAGS += -static -static-libgcc -static-libstdc++

0 commit comments

Comments
 (0)