Skip to content

Commit

Permalink
Explicitly link against the dotnet/llvm-project libc++ (dotnet#102001)
Browse files Browse the repository at this point in the history
  • Loading branch information
jkoritzinsky committed May 8, 2024
1 parent 5f02413 commit bca9f0f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/mono/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -635,9 +635,9 @@ if(LLVM_PREFIX)
endif()

if(HOST_LINUX AND NOT HOST_WASM AND NOT HOST_WASI AND ${llvm_api_version} GREATER_EQUAL 1600)
set(MONO_stdlib "-stdlib=libc++")
set(MONO_cxx_lib "-L${LLVM_PREFIX}/lib -lc++")
set(MONO_cxx_include "-I${LLVM_PREFIX}/include/c++/v1")
set(MONO_stdlib "-nostdinc++ -nostdlib++")
set(MONO_cxx_lib "-L${LLVM_PREFIX}/lib -lc++ -lc++abi")
set(MONO_cxx_include "-isystem ${LLVM_PREFIX}/include/c++/v1")
endif()

if(${llvm_api_version} GREATER_EQUAL 1600)
Expand Down
4 changes: 2 additions & 2 deletions src/mono/mono.proj
Original file line number Diff line number Diff line change
Expand Up @@ -283,9 +283,9 @@
</ItemGroup>

<ItemGroup Condition="'$(HostOS)' == 'Linux' and '$(MonoEnableLLVM)' == 'true' and '$(TargetArchitecture)' != 'wasm' and '$(MonoUseLibCxx)' == 'true'">
<_MonoCXXFLAGS Include="-I$(MonoLLVMDir)\$(_MonoLLVMTargetArchitecture)\include\c++\v1" />
<_MonoCXXFLAGS Include="-isystem $(MonoLLVMDir)\$(_MonoLLVMTargetArchitecture)\include\c++\v1" />
<_MonoCXXFLAGS Include="-L$(MonoLLVMDir)\$(_MonoLLVMTargetArchitecture)\lib" />
<_MonoCXXFLAGS Include="-stdlib=libc++" />
<_MonoCXXFLAGS Include="-lc++;-lc++abi" />
<_MonoCMakeArgs Include="-DMONO_SET_RPATH_ORIGIN=true" />
</ItemGroup>

Expand Down

0 comments on commit bca9f0f

Please sign in to comment.