Skip to content

Commit

Permalink
Add recipe for oneTBB
Browse files Browse the repository at this point in the history
  • Loading branch information
andrjohns committed May 21, 2024
1 parent c07d899 commit e8bf87b
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
29 changes: 29 additions & 0 deletions libs/recipes/oneTBB/rules.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
ONETBB_VERSION = 2021.12.0
ONETBB_TARBALL = $(DOWNLOAD)/oneTBB-$(ONETBB_VERSION).tar.gz
ONETBB_URL = https://github.com/oneapi-src/oneTBB/archive/refs/tags/v$(ONETBB_VERSION).tar.gz

.PHONY: oneTBB
oneTBB: $(ONETBB_WASM_LIB)

$(ONETBB_TARBALL):
mkdir -p $(DOWNLOAD)
wget $(ONETBB_URL) -O $@

$(ONETBB_WASM_LIB): $(ONETBB_TARBALL)
mkdir -p $(BUILD)/oneTBB-$(ONETBB_VERSION)/build
tar -C $(BUILD) -xf $(ONETBB_TARBALL)
cd $(BUILD)/oneTBB-$(ONETBB_VERSION)/build && \
emcmake cmake \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_FIND_ROOT_PATH=$(WASM) \
-DCMAKE_INSTALL_PREFIX:PATH=$(WASM) \
-DTBB_STRICT=OFF \
-DCMAKE_CXX_FLAGS=-Wno-unused-command-line-argument \
-DTBB_DISABLE_HWLOC_AUTOMATIC_SEARCH=ON \
-DBUILD_SHARED_LIBS=OFF \
-DTBB_EXAMPLES=OFF \
-DTBB_TEST=OFF \
-DEMSCRIPTEN_WITHOUT_PTHREAD=true \
.. && \
cmake --build . && \
cmake --install .
2 changes: 2 additions & 0 deletions libs/recipes/oneTBB/targets.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ONETBB_WASM_LIB = $(WASM)/lib/libtbb.a $(WASM)/lib/libtbbmalloc.a
OPTIONAL_WASM_LIBS += $(ONETBB_WASM_LIB)

0 comments on commit e8bf87b

Please sign in to comment.