Skip to content

Commit

Permalink
Add option to use clang's MSVC ABI
Browse files Browse the repository at this point in the history
  • Loading branch information
Oliver-makes-code committed Dec 1, 2024
1 parent fd054b7 commit ef869d4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,10 @@ find_package(Threads)
if(NOT CMAKE_SYSTEM_NAME STREQUAL "WASI")
list(APPEND qjs_libs ${CMAKE_THREAD_LIBS_INIT})
endif()
if(NOT MSVC)

# if CC is clang, and the ABI is (.*)-windows-msvc, we don't want to link libm.
xoption(QJS_CLANG_MSVC_ABI "Whether to treat compilation as using Clang's MSVC ABI." OFF)
if(NOT MSVC AND NOT QJS_CLANG_MSVC_ABI)
list(APPEND qjs_libs m)
endif()

Expand Down

0 comments on commit ef869d4

Please sign in to comment.