From adc1097496530c161d5f6d30ea100c802413e760 Mon Sep 17 00:00:00 2001 From: Altina Orion <139891033+Altina-oz@users.noreply.github.com> Date: Fri, 24 May 2024 21:47:38 +0800 Subject: [PATCH] Update tbb 2021.12.0 (#4121) * Update tbb 2021.12.0 * Update xmake.lua try to add ldflags for android r26* * fix * typo * test add undefied version only * typo2 * test * Update xmake.lua * Test ndk log pattern * Update xmake.lua test * Update xmake.lua typo? * typo * ndk r26* workaround Test ndk r26* workaround * re-test due to configure pagefile failure * Update xmake.lua --------- Co-authored-by: star9029 --- packages/t/tbb/xmake.lua | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/packages/t/tbb/xmake.lua b/packages/t/tbb/xmake.lua index e8083706828..3ca49861c23 100644 --- a/packages/t/tbb/xmake.lua +++ b/packages/t/tbb/xmake.lua @@ -19,6 +19,7 @@ package("tbb") add_versions("2021.7.0", "2cae2a80cda7d45dc7c072e4295c675fff5ad8316691f26f40539f7e7e54c0cc") add_versions("2021.10.0", "487023a955e5a3cc6d3a0d5f89179f9b6c0ae7222613a7185b0227ba0c83700b") add_versions("2021.11.0", "782ce0cab62df9ea125cdea253a50534862b563f1d85d4cda7ad4e77550ac363") + add_versions("2021.12.0", "c7bb7aa69c254d91b8f0041a71c5bcc3936acb64408a1719aec0b2b7639dd84f") else add_urls("https://github.com/oneapi-src/oneTBB/archive/v$(version).tar.gz") add_versions("2020.3", "ebc4f6aa47972daed1f7bf71d100ae5bf6931c2e3144cf299c8cc7d041dca2f3") @@ -29,7 +30,8 @@ package("tbb") add_versions("2021.7.0", "2cae2a80cda7d45dc7c072e4295c675fff5ad8316691f26f40539f7e7e54c0cc") add_versions("2021.10.0", "487023a955e5a3cc6d3a0d5f89179f9b6c0ae7222613a7185b0227ba0c83700b") add_versions("2021.11.0", "782ce0cab62df9ea125cdea253a50534862b563f1d85d4cda7ad4e77550ac363") - + add_versions("2021.12.0", "c7bb7aa69c254d91b8f0041a71c5bcc3936acb64408a1719aec0b2b7639dd84f") + add_patches("2021.2.0", path.join(os.scriptdir(), "patches", "2021.2.0", "gcc11.patch"), "181511cf4878460cb48ac0531d3ce8d1c57626d698e9001a0951c728fab176fb") add_patches("2021.5.0", path.join(os.scriptdir(), "patches", "2021.5.0", "i386.patch"), "1a1c11724839cf98b1b8f4d415c0283ec7719c330b11503c578739eb02889ec0") @@ -64,7 +66,18 @@ package("tbb") io.replace("cmake/compilers/GNU.cmake", "-Wl,-z,relro,-z,now,-z,noexecstack", "", {plain = true}) table.insert(configs, "-DCMAKE_SYSTEM_PROCESSOR=" .. (package:is_arch("x86_64") and "AMD64" or "i686")) end - import("package.tools.cmake").install(package, configs) + + local exflags + if package:is_plat("android") then + import("core.tool.toolchain") + + local ndk = toolchain.load("ndk", {plat = package:plat(), arch = package:arch()}) + local ndkver = ndk:config("ndkver") + if ndkver == 26 then + exflags = {"-Wl,--undefined-version"} + end + end + import("package.tools.cmake").install(package, configs, {shflags = exflags, ldflags = exflags}) if package:is_plat("mingw") then local ext = package:config("shared") and ".dll.a" or ".a" local libfiles = os.files(path.join(package:installdir("lib"), "libtbb*" .. ext))