Skip to content

Commit 5d6006c

Browse files
authored
Merge pull request #310 from AkechiShiro/brew-ruby-CI-CD-fix
Brew ruby for macOS Monterey CI/CD fix
2 parents 8dcf690 + 09c9450 commit 5d6006c

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

source/loaders/rb_loader/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ target_compile_options(${target}
193193

194194
include(Portability)
195195
if("${PROJECT_OS_FAMILY}" STREQUAL "macos" )
196-
if("${CMAKE_C_COMPILER_ID}" STREQUAL "AppleClang" OR "${CMAKE_C_COMPILER_ID}" STREQUAL "Clang")
196+
if("${CMAKE_C_COMPILER_ID}" STREQUAL "AppleClang" OR "${CMAKE_C_COMPILER_ID}" STREQUAL "AppleClang*" OR "${CMAKE_C_COMPILER_ID}" STREQUAL "Clang")
197197
target_compile_options(${target} PRIVATE "-fdeclspec")
198198
endif()
199199
endif()

source/ports/rb_port/CMakeLists.txt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,17 @@ target_compile_options(${SWIG_MODULE_${target}_REAL_NAME}
221221
INTERFACE
222222
)
223223

224+
# Fix Ruby MacOSX LLVM bug
225+
# '__declspec' attributes are not enabled; use '-fdeclspec' or '-fms-extensions' to enable support for __declspec attributes
226+
227+
include(Portability)
228+
if("${PROJECT_OS_FAMILY}" STREQUAL "macos" )
229+
if("${CMAKE_C_COMPILER_ID}" STREQUAL "AppleClang" OR "${CMAKE_C_COMPILER_ID}" STREQUAL "AppleClang*" OR "${CMAKE_C_COMPILER_ID}" STREQUAL "Clang")
230+
target_compile_options(${target} PRIVATE "-fdeclspec")
231+
endif()
232+
endif()
233+
234+
224235
#
225236
# Linker options
226237
#

0 commit comments

Comments
 (0)