You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When abseil is build with MSVC it generates CMake targets with the property INTERFACE_LINK_LIBRARIES set with flags not compatible with clang/LLVM, -ignore:4221. This makes it impossible to link to the MSVC built abseil library with a program built with clang/LLVM.
For example see the generated file abslTargets.cmake:
Windows build environment with the following installed:
Visual Sudio and LLVM installed. My current LLVM version is 17.0.6 and MSVC version is 19.38.33134 but this is most probably reproducable with the latest versions of these tools.
CMake
Ninja
How to Reproduce
This example is using abseil from VCPKG where VCPKG will build the libraries with MSVC and the example is explicitly built with clang/LLVM.
Make sure to clear your VCPKG cache first.
Steps to reproduce:
git clone https://github.com/kotten73/abseil_repro
cd abseil_repro
mkdir build
cd build
cmake -G "Ninja" .. -DCMAKE_C_COMPILER="clang" -DCMAKE_CXX_COMPILER="clang++" -DCMAKE_RC_COMPILER="llvm-rc"
ninja
Observation
When abseil is build with MSVC it generates CMake targets with the property INTERFACE_LINK_LIBRARIES set with flags not compatible with clang/LLVM, -ignore:4221. This makes it impossible to link to the MSVC built abseil library with a program built with clang/LLVM.
For example see the generated file abslTargets.cmake:
Expected behavior
It should be possible to link a clang/LLVM built binary with a MSVC built abseil library.
Steps to reproduce the problem
I have created a GitHub repo for the purpose of reproducing this, https://github.com/kotten73/abseil_repro .
Prerequisites
How to Reproduce
This example is using abseil from VCPKG where VCPKG will build the libraries with MSVC and the example is explicitly built with clang/LLVM.
Make sure to clear your VCPKG cache first.
Steps to reproduce:
The error I get is:
What version of Abseil are you using?
074a32a
What operating system and version are you using?
Windows 11
What compiler and version are you using?
LLVM version is 17.0.6 and MSVC version is 19.38.33134
What build system are you using?
cmake version 3.29.5
ninja version 1.12.1
Additional context
No response
The text was updated successfully, but these errors were encountered: