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

Carlo Bramini via flang-commits flang-commits at lists.llvm.org
Fri Sep 22 02:23:33 PDT 2023


https://github.com/carlo-bramini created https://github.com/llvm/llvm-project/pull/67105

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.

>From 44fe44665816269d7d3e9742fb57a12a929aafca 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 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/flang/test/CMakeLists.txt b/flang/test/CMakeLists.txt
index 7d96a72e5f36d6d..8dd6f69040d060e 100644
--- a/flang/test/CMakeLists.txt
+++ b/flang/test/CMakeLists.txt
@@ -65,7 +65,7 @@ set(FLANG_TEST_DEPENDS
   Fortran_main
   FortranDecimal
 )
-if (LLVM_ENABLE_PLUGINS AND NOT WIN32)
+if (LLVM_ENABLE_PLUGINS AND NOT (WIN32 OR CYGWIN))
   list(APPEND FLANG_TEST_DEPENDS Bye)
 endif()
 



More information about the flang-commits mailing list