mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-28 00:09:04 +00:00
build: statically link MinGW runtime in LLVM tools on Windows
Signed-off-by: deadprogram <ron@hybridgroup.com>
This commit is contained in:
@@ -65,7 +65,7 @@ jobs:
|
|||||||
uses: actions/cache/restore@v5
|
uses: actions/cache/restore@v5
|
||||||
id: cache-llvm-build
|
id: cache-llvm-build
|
||||||
with:
|
with:
|
||||||
key: llvm-build-20-windows-v4
|
key: llvm-build-20-windows-v5
|
||||||
path: llvm-build
|
path: llvm-build
|
||||||
- name: Build LLVM
|
- name: Build LLVM
|
||||||
if: steps.cache-llvm-build.outputs.cache-hit != 'true'
|
if: steps.cache-llvm-build.outputs.cache-hit != 'true'
|
||||||
|
|||||||
@@ -142,6 +142,9 @@ ifeq ($(OS),Windows_NT)
|
|||||||
|
|
||||||
# PIC needs to be disabled for libclang to work.
|
# PIC needs to be disabled for libclang to work.
|
||||||
LLVM_OPTION += -DLLVM_ENABLE_PIC=OFF
|
LLVM_OPTION += -DLLVM_ENABLE_PIC=OFF
|
||||||
|
# Statically link the C++ and GCC runtime into LLVM tools so they don't
|
||||||
|
# depend on MinGW DLLs that may not be on PATH when executed during the build.
|
||||||
|
LLVM_OPTION += '-DCMAKE_EXE_LINKER_FLAGS=-static-libgcc -static-libstdc++'
|
||||||
|
|
||||||
CGO_CPPFLAGS += -DCINDEX_NO_EXPORTS
|
CGO_CPPFLAGS += -DCINDEX_NO_EXPORTS
|
||||||
CGO_LDFLAGS += -static -static-libgcc -static-libstdc++
|
CGO_LDFLAGS += -static -static-libgcc -static-libstdc++
|
||||||
|
|||||||
Reference in New Issue
Block a user