Skip to content

Commit

Permalink
Remove -mrtm and -mwaitpkg flags for Emscripten
Browse files Browse the repository at this point in the history
  • Loading branch information
guusw committed Jan 29, 2024
1 parent 2e92358 commit 5f72584
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions cmake/compilers/Clang.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,10 @@ if (NOT TBB_STRICT AND COMMAND tbb_remove_compile_flag)
endif()

# Enable Intel(R) Transactional Synchronization Extensions (-mrtm) and WAITPKG instructions support (-mwaitpkg) on relevant processors
if (CMAKE_SYSTEM_PROCESSOR MATCHES "(AMD64|amd64|i.86|x86)")
set(TBB_COMMON_COMPILE_FLAGS ${TBB_COMMON_COMPILE_FLAGS} -mrtm $<$<NOT:$<VERSION_LESS:${CMAKE_CXX_COMPILER_VERSION},12.0>>:-mwaitpkg>)
if(NOT EMSCRIPTEN)
if (CMAKE_SYSTEM_PROCESSOR MATCHES "(AMD64|amd64|i.86|x86)")
set(TBB_COMMON_COMPILE_FLAGS ${TBB_COMMON_COMPILE_FLAGS} -mrtm $<$<NOT:$<VERSION_LESS:${CMAKE_CXX_COMPILER_VERSION},12.0>>:-mwaitpkg>)
endif()
endif()

# Clang flags to prevent compiler from optimizing out security checks
Expand Down

0 comments on commit 5f72584

Please sign in to comment.