From e8bf87bf857ffa68e18137cd08943a3208382feb Mon Sep 17 00:00:00 2001 From: Andrew Johnson Date: Tue, 21 May 2024 23:42:28 +0300 Subject: [PATCH 1/5] Add recipe for oneTBB --- libs/recipes/oneTBB/rules.mk | 29 +++++++++++++++++++++++++++++ libs/recipes/oneTBB/targets.mk | 2 ++ 2 files changed, 31 insertions(+) create mode 100644 libs/recipes/oneTBB/rules.mk create mode 100644 libs/recipes/oneTBB/targets.mk diff --git a/libs/recipes/oneTBB/rules.mk b/libs/recipes/oneTBB/rules.mk new file mode 100644 index 00000000..44cd67e1 --- /dev/null +++ b/libs/recipes/oneTBB/rules.mk @@ -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 . diff --git a/libs/recipes/oneTBB/targets.mk b/libs/recipes/oneTBB/targets.mk new file mode 100644 index 00000000..ba77e173 --- /dev/null +++ b/libs/recipes/oneTBB/targets.mk @@ -0,0 +1,2 @@ +ONETBB_WASM_LIB = $(WASM)/lib/libtbb.a $(WASM)/lib/libtbbmalloc.a +OPTIONAL_WASM_LIBS += $(ONETBB_WASM_LIB) From bb37ef3b57d17a32f407d70cafb59a6022363dfe Mon Sep 17 00:00:00 2001 From: Andrew Johnson Date: Tue, 21 May 2024 23:50:06 +0300 Subject: [PATCH 2/5] Add headers to vfs --- libs/recipes/oneTBB/targets.mk | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libs/recipes/oneTBB/targets.mk b/libs/recipes/oneTBB/targets.mk index ba77e173..d8bb44aa 100644 --- a/libs/recipes/oneTBB/targets.mk +++ b/libs/recipes/oneTBB/targets.mk @@ -1,2 +1,4 @@ ONETBB_WASM_LIB = $(WASM)/lib/libtbb.a $(WASM)/lib/libtbbmalloc.a OPTIONAL_WASM_LIBS += $(ONETBB_WASM_LIB) +WASM_LAZY_VFS += -i "$(WASM)/include/tbb@/usr/include/tbb" +WASM_LAZY_VFS += -i "$(WASM)/include/oneapi@/usr/include/oneapi" From 37c5b28c7f269b4a2e19eea41251101ce5aaddc0 Mon Sep 17 00:00:00 2001 From: Andrew Johnson Date: Sun, 2 Jun 2024 20:15:28 +0300 Subject: [PATCH 3/5] Fix indent style, remove vfs c headers --- libs/recipes/oneTBB/rules.mk | 20 ++++++++++---------- libs/recipes/oneTBB/targets.mk | 2 -- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/libs/recipes/oneTBB/rules.mk b/libs/recipes/oneTBB/rules.mk index 44cd67e1..4723c5fe 100644 --- a/libs/recipes/oneTBB/rules.mk +++ b/libs/recipes/oneTBB/rules.mk @@ -17,13 +17,13 @@ $(ONETBB_WASM_LIB): $(ONETBB_TARBALL) -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 . + -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 . diff --git a/libs/recipes/oneTBB/targets.mk b/libs/recipes/oneTBB/targets.mk index d8bb44aa..ba77e173 100644 --- a/libs/recipes/oneTBB/targets.mk +++ b/libs/recipes/oneTBB/targets.mk @@ -1,4 +1,2 @@ ONETBB_WASM_LIB = $(WASM)/lib/libtbb.a $(WASM)/lib/libtbbmalloc.a OPTIONAL_WASM_LIBS += $(ONETBB_WASM_LIB) -WASM_LAZY_VFS += -i "$(WASM)/include/tbb@/usr/include/tbb" -WASM_LAZY_VFS += -i "$(WASM)/include/oneapi@/usr/include/oneapi" From 576fb892adcfe5586feac8efd50524dafc2b941e Mon Sep 17 00:00:00 2001 From: Andrew Johnson Date: Mon, 3 Jun 2024 07:02:42 +0300 Subject: [PATCH 4/5] Fix tbbmalloc linking error --- libs/recipes/oneTBB/rules.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/libs/recipes/oneTBB/rules.mk b/libs/recipes/oneTBB/rules.mk index 4723c5fe..a7f1e3a1 100644 --- a/libs/recipes/oneTBB/rules.mk +++ b/libs/recipes/oneTBB/rules.mk @@ -24,6 +24,7 @@ $(ONETBB_WASM_LIB): $(ONETBB_TARBALL) -DTBB_EXAMPLES=OFF \ -DTBB_TEST=OFF \ -DEMSCRIPTEN_WITHOUT_PTHREAD=true \ + -DTBB_COMMON_COMPILE_FLAGS="-U__TBB_USE_ITT_NOTIFY" \ .. && \ cmake --build . && \ cmake --install . From e5e612b97a7fad13eb8e3504aa37c963784d3256 Mon Sep 17 00:00:00 2001 From: Andrew Johnson Date: Sun, 14 Jul 2024 22:56:17 +0300 Subject: [PATCH 5/5] Bump to latest oneTBB release --- libs/recipes/oneTBB/rules.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/recipes/oneTBB/rules.mk b/libs/recipes/oneTBB/rules.mk index a7f1e3a1..af5e27c7 100644 --- a/libs/recipes/oneTBB/rules.mk +++ b/libs/recipes/oneTBB/rules.mk @@ -1,4 +1,4 @@ -ONETBB_VERSION = 2021.12.0 +ONETBB_VERSION = 2021.13.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