MSYS2-packages/llvm/0102-hack-cygwin-allow-multiple-definition-in-c-index-tes.patch
Jeremy Drake 0586ad6beb llvm: update to 21.1.0
add an msysize patch to deal with the fallout of teaching the Cygwin
driver how to call the linker directly instead of using GCC to do it
2025-08-27 17:57:40 -07:00

28 lines
834 B
Diff

From c5e7a8da266d07530293d3641a03f7ff63bc3a28 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.51.0.windows.1