Skip to content

Commit

Permalink
clang-cl: Link against clang_rt.builtins-x86_64.lib
Browse files Browse the repository at this point in the history
Fixes build with clang-cl on Windows.

This is a workaround for
llvm/llvm-project#25679

Change-Id: I6dc8b045376101d8b8cc26fe5db3e7bf87a6a8f4
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
  • Loading branch information
stampho committed Jun 20, 2024
1 parent 9a11273 commit 7b049e1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/corelib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -843,12 +843,16 @@ qt_internal_extend_target(Core CONDITION WASM
text/qlocale_wasm.cpp
)

# On MS-Win, clang has two flavors, one of which immitates MSVC (so claims to be it)
qt_internal_extend_target(Core CONDITION MSVC
LIBRARIES
runtimeobject
)

qt_internal_extend_target(Core CONDITION MSVC AND CLANG
LIBRARIES
clang_rt.builtins-x86_64
)

qt_internal_extend_target(Core CONDITION QT_FEATURE_icu
SOURCES
text/qcollator_icu.cpp
Expand Down
5 changes: 5 additions & 0 deletions src/tools/bootstrap/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,11 @@ qt_internal_extend_target(Bootstrap CONDITION WIN32
user32
)

qt_internal_extend_target(Bootstrap CONDITION MSVC AND CLANG
LIBRARIES
clang_rt.builtins-x86_64
)

qt_internal_extend_target(Bootstrap CONDITION APPLE
SOURCES
../../corelib/global/qoperatingsystemversion.cpp
Expand Down

0 comments on commit 7b049e1

Please sign in to comment.