Skip to content

Commit 6501afe

Browse files
hahnjodevajithvs
authored andcommitted
[runtime_cxxmodules] Fix macOS 13 modulemap for LLVM 18
This applies the upstream changes in commit llvm/llvm-project@9992b38 to a copy of the modulemap from MacOSX14.2.sdk.
1 parent 895f4a7 commit 6501afe

File tree

3 files changed

+1713
-13
lines changed

3 files changed

+1713
-13
lines changed

core/clingutils/CMakeLists.txt

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,9 +119,15 @@ if (runtime_cxxmodules)
119119
set(custom_modulemaps ${custom_modulemaps} vc.modulemap)
120120

121121
# We need to override the default modulemap because instead of producing a
122-
# single std.pcm, produces hundreds of pcms. This changed with sdk 15.3.
123-
if (CMAKE_SYSTEM_NAME MATCHES Darwin AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 15.0.0.15000309)
124-
set(custom_modulemaps ${custom_modulemaps} std_darwin.modulemap)
122+
# single std.pcm, produces hundreds of pcms. This changed with MacOSX14.4.sdk
123+
# To support macOS 13 with LLVM 18, we need to patch the modulemap from
124+
# MacOSX14.2.sdk
125+
if (APPLE)
126+
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 15.0.0.15000309)
127+
set(custom_modulemaps ${custom_modulemaps} std_darwin.MacOSX14.2.sdk.modulemap)
128+
else()
129+
set(custom_modulemaps ${custom_modulemaps} std_darwin.modulemap)
130+
endif()
125131
endif()
126132

127133
if (NOT libcxx)

0 commit comments

Comments
 (0)