Skip to content

Commit

Permalink
[runtime_cxxmodules] Fix macOS 13 modulemap for LLVM 18
Browse files Browse the repository at this point in the history
This applies the upstream changes in commit
llvm/llvm-project@9992b38
to a copy of the modulemap from MacOSX14.2.sdk.
  • Loading branch information
hahnjo authored and devajithvs committed Aug 28, 2024
1 parent c90c882 commit 61da02d
Show file tree
Hide file tree
Showing 3 changed files with 1,713 additions and 13 deletions.
12 changes: 9 additions & 3 deletions core/clingutils/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,15 @@ if (runtime_cxxmodules)
set(custom_modulemaps ${custom_modulemaps} vc.modulemap)

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

if (NOT libcxx)
Expand Down
Loading

0 comments on commit 61da02d

Please sign in to comment.