[llvm] [LLVM][Cygwin] Remove special case for CXX extensions on Cygwin. (PR #138328)

via llvm-commits llvm-commits at lists.llvm.org
Fri May 2 12:16:18 PDT 2025


https://github.com/jeremyd2019 created https://github.com/llvm/llvm-project/pull/138328

This is no longer necessary, and results in an inconvenient define of `i386` on i386 Cygwin targets which breaks compiling llvm/include/llvm/ExecutionEngine/JITLink/i386.h.

>From e22a64c3ad0a7afe49a9039898f79c72d75f6ece Mon Sep 17 00:00:00 2001
From: Jeremy Drake <github at jdrake.com>
Date: Fri, 2 May 2025 12:10:13 -0700
Subject: [PATCH] [LLVM][Cygwin] Remove special case for CYGWIN extensions.

This is no longer necessary, and results in an inconvenient define of
`i386` on i386 Cygwin targets which breaks compiling
llvm/include/llvm/ExecutionEngine/JITLink/i386.h.

Signed-off-by: Jeremy Drake <github at jdrake.com>
---
 llvm/CMakeLists.txt | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/llvm/CMakeLists.txt b/llvm/CMakeLists.txt
index 47cbea3d0e872..e8d9ec0d6153a 100644
--- a/llvm/CMakeLists.txt
+++ b/llvm/CMakeLists.txt
@@ -76,14 +76,7 @@ endif()
 
 set(CMAKE_CXX_STANDARD ${LLVM_REQUIRED_CXX_STANDARD} CACHE STRING "C++ standard to conform to")
 set(CMAKE_CXX_STANDARD_REQUIRED YES)
-
-if (CYGWIN)
-  # Cygwin is a bit stricter and lack things like 'strdup', 'stricmp', etc in
-  # c++xx mode.
-  set(CMAKE_CXX_EXTENSIONS YES)
-else()
-  set(CMAKE_CXX_EXTENSIONS NO)
-endif()
+set(CMAKE_CXX_EXTENSIONS NO)
 
 if (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
   message(FATAL_ERROR "



More information about the llvm-commits mailing list