MSYS2-packages/llvm/0109-hack-cygwin-allow-multiple-definition-in-c-index-tes.patch
2025-07-09 17:24:53 -07:00

28 lines
834 B
Diff

From c5188f28de0dc6a38b7d67da58dc227353032938 Mon Sep 17 00:00:00 2001
From: Jeremy Drake <github@jdrake.com>
Date: Sun, 13 Apr 2025 22:39:46 -0700
Subject: [PATCH] hack: cygwin: allow multiple definition in c-index-test
---
clang/tools/c-index-test/CMakeLists.txt | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/clang/tools/c-index-test/CMakeLists.txt b/clang/tools/c-index-test/CMakeLists.txt
index 24e7c9692c..3858fe5478 100644
--- a/clang/tools/c-index-test/CMakeLists.txt
+++ b/clang/tools/c-index-test/CMakeLists.txt
@@ -31,6 +31,10 @@ else()
clangIndex
clangSerialization
)
+ if (CYGWIN AND LLVM_LINKER_IS_GNULD)
+ # auto-import screwup?
+ target_link_options(c-index-test PRIVATE LINKER:--allow-multiple-definition)
+ endif()
endif()
set_target_properties(c-index-test
--
2.50.1.windows.1