Skip to content

Commit

Permalink
fix(deps): bump tbb and enable its compilation with emscripten
Browse files Browse the repository at this point in the history
Signed-off-by: Roberto Scolaro <roberto.scolaro21@gmail.com>
  • Loading branch information
therealbobo authored and poiana committed Nov 8, 2024
1 parent 10d5968 commit 92ac60c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
9 changes: 7 additions & 2 deletions cmake/modules/tbb.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -58,16 +58,20 @@ else()

if(NOT TARGET tbb)
message(STATUS "Using bundled tbb in '${TBB_SRC}'")
set(TBB_SRC_URL "https://github.com/oneapi-src/oneTBB/archive/refs/tags/v2021.9.0.tar.gz")
set(TBB_SRC_URL "https://github.com/oneapi-src/oneTBB/archive/refs/tags/v2022.0.0.tar.gz")
set(TBB_SRC_URL_HASH
"SHA256=1ce48f34dada7837f510735ff1172f6e2c261b09460e3bf773b49791d247d24e"
"SHA256=e8e89c9c345415b17b30a2db3095ba9d47647611662073f7fbf54ad48b7f3c2a"
)
set(TBB_FLAGS "")
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
# latest TBB has issues with GCC >= 12 see:
# https://github.com/oneapi-src/oneTBB/issues/843#issuecomment-1152646035
set(TBB_FLAGS "-Wno-error=stringop-overflow")
endif()
if(EMSCRIPTEN)
set(TBB_FLAGS "${TBB_FLAGS} -Wno-unused-command-line-argument")
set(TBB_EMSCRIPTEN "ON")
endif()

if(NOT WIN32)
ExternalProject_Add(
Expand All @@ -84,6 +88,7 @@ else()
-DCMAKE_POSITION_INDEPENDENT_CODE=${ENABLE_PIC}
-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
-DEMSCRIPTEN=${TBB_EMSCRIPTEN}
BUILD_BYPRODUCTS ${TBB_LIB}
INSTALL_COMMAND ""
)
Expand Down
5 changes: 1 addition & 4 deletions userspace/libsinsp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ include(ExternalProject)
include(BuildPkgConfigDependencies)
include(jsoncpp)
include(zlib)
include(tbb)

if(NOT MINIMAL_BUILD)
if(NOT WIN32 AND NOT EMSCRIPTEN)
Expand All @@ -48,10 +49,6 @@ if(NOT WIN32 AND NOT APPLE)
endif() # NOT MINIMAL_BUILD
endif()

if(NOT EMSCRIPTEN)
include(tbb)
endif()

add_library(
sinsp
filter/ast.cpp
Expand Down

0 comments on commit 92ac60c

Please sign in to comment.