[flang-commits] [flang] [flang][CMake] CYGWIN: Fix undefined references at link time. (PR #67105)

via flang-commits flang-commits at lists.llvm.org
Sat Jul 26 10:08:20 PDT 2025


https://github.com/jeremyd2019 updated https://github.com/llvm/llvm-project/pull/67105

>From be4d8681e3bc4bf757e97b439bea742591771d94 Mon Sep 17 00:00:00 2001
From: Carlo Bramini <30959007+carlo-bramini at users.noreply.github.com>
Date: Fri, 22 Sep 2023 11:22:29 +0200
Subject: [PATCH] [flang][CMake] CYGWIN: Fix undefined references at link time.

While building the source of flang on CYGWIN, the process suddently stopped with lot of "Undefined reference" errors at link time. According to the statement that a shared library can't have undefined references on Windows, I applied the same fix to CYGWIN with this patch.
---
 flang/test/CMakeLists.txt | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/flang/test/CMakeLists.txt b/flang/test/CMakeLists.txt
index a658f6f984faf..776df4839e844 100644
--- a/flang/test/CMakeLists.txt
+++ b/flang/test/CMakeLists.txt
@@ -65,6 +65,7 @@ set(FLANG_TEST_DEPENDS
   bbc
   FortranDecimal
 )
+
 if (NOT FLANG_STANDALONE_BUILD)
   list(APPEND FLANG_TEST_DEPENDS
     llvm-config
@@ -78,7 +79,7 @@ if (NOT FLANG_STANDALONE_BUILD)
   )
 endif ()
 
-if (LLVM_BUILD_EXAMPLES AND LLVM_ENABLE_PLUGINS AND NOT WIN32 AND NOT FLANG_STANDALONE_BUILD)
+if (LLVM_BUILD_EXAMPLES AND LLVM_ENABLE_PLUGINS AND NOT (WIN32 OR CYGWIN) AND NOT FLANG_STANDALONE_BUILD)
   list(APPEND FLANG_TEST_DEPENDS Bye)
 endif()
 



More information about the flang-commits mailing list