From 170acfb7091b5688b04c34677aece4a652c09c97 Mon Sep 17 00:00:00 2001 From: ganchuantao1 Date: Wed, 2 Jul 2025 17:21:25 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=20=20=20=20=E8=A7=A3=E5=86=B3IOS=E7=BC=96?= =?UTF-8?q?=E8=AF=91=E9=94=99=E8=AF=AF=20=20=20=20=20Signed-off-by:ganchua?= =?UTF-8?q?ntao1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: ganchuantao1 --- BUILD.gn | 2 +- fix-mac-complier-error.patch | 17 +++++++++++++++++ install.sh | 1 + install_no_lock.sh | 1 + 4 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 fix-mac-complier-error.patch diff --git a/BUILD.gn b/BUILD.gn index 8e540d8..1f9be2b 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -15,7 +15,7 @@ import("//build/ohos.gni") import("./configure_copts.gni") action("abseil_cpp_action") { - if (is_mac || is_ios) { + if (host_os == "mac") { script = "//third_party/abseil-cpp/install_no_lock.sh" } else { script = "//third_party/abseil-cpp/install.sh" diff --git a/fix-mac-complier-error.patch b/fix-mac-complier-error.patch new file mode 100644 index 0000000..9f0b7e8 --- /dev/null +++ b/fix-mac-complier-error.patch @@ -0,0 +1,17 @@ +diff -uprN a/absl/base/options.h b/absl/base/options.h +--- a/absl/base/options.h 2025-02-03 23:50:45.000000000 +0800 ++++ b/absl/base/options.h 2025-07-02 17:13:16.118136800 +0800 +@@ -173,9 +173,11 @@ + // User code should not inspect this macro. To check in the preprocessor if + // absl::variant is a typedef of std::variant, use the feature macro + // ABSL_USES_STD_VARIANT. +- ++#if defined(ARK_UI_X) ++#define ABSL_OPTION_USE_STD_VARIANT 0 ++#else + #define ABSL_OPTION_USE_STD_VARIANT 2 +- ++#endif + // ABSL_OPTION_USE_STD_ORDERING + // + // This option controls whether absl::{partial,weak,strong}_ordering are diff --git a/install.sh b/install.sh index 48e62b9..1935fff 100755 --- a/install.sh +++ b/install.sh @@ -17,6 +17,7 @@ tar zxvf $2/abseil-cpp-20250127.0.tar.gz mv abseil-cpp-20250127.0 abseil-cpp cd abseil-cpp patch -p1 < $2/fix-mingw-complier-error.patch +patch -p1 < $2/fix-mac-complier-error.patch flock -u 100 } 100<>lock_file.lock exit 0 \ No newline at end of file diff --git a/install_no_lock.sh b/install_no_lock.sh index ff999fb..11a0be9 100755 --- a/install_no_lock.sh +++ b/install_no_lock.sh @@ -15,4 +15,5 @@ tar zxvf $2/abseil-cpp-20250127.0.tar.gz mv abseil-cpp-20250127.0 abseil-cpp cd abseil-cpp patch -p1 < $2/fix-mingw-complier-error.patch +patch -p1 < $2/fix-mac-complier-error.patch exit 0 -- Gitee From 8100b51de635aa430da424723bf0bf2c2fefe36a Mon Sep 17 00:00:00 2001 From: ganchuantao Date: Fri, 4 Jul 2025 00:59:19 +0000 Subject: [PATCH 2/3] =?UTF-8?q?=E8=A7=A3=E5=86=B3IOS=E7=BC=96=E8=AF=91?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: ganchuantao --- BUILD.gn | 1 + 1 file changed, 1 insertion(+) diff --git a/BUILD.gn b/BUILD.gn index 1f9be2b..5f4056d 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -444,6 +444,7 @@ ohos_static_library("absl_base_static") { include_dirs = [ "${ABSEIL_DIR}/" ] cflags = ABSL_DEFAULT_COPTS public_configs = [ ":absl_public_config" ] + defines = [ "ARK_UI_X" ] deps = [":abseil_cpp_action",] subsystem_name = "${THIRDPARTY_ABSEIL_SUBSYS_NAME}" part_name = "${THIRDPARTY_ABSEIL_PART_NAME}" -- Gitee From 80a7b55d7194466402a3b5fecb1aea27ba2bbf91 Mon Sep 17 00:00:00 2001 From: ganchuantao Date: Fri, 4 Jul 2025 02:55:42 +0000 Subject: [PATCH 3/3] =?UTF-8?q?=E8=A7=A3=E5=86=B3IOS=E7=BC=96=E8=AF=91?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: ganchuantao --- BUILD.gn | 1 - 1 file changed, 1 deletion(-) diff --git a/BUILD.gn b/BUILD.gn index 5f4056d..1f9be2b 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -444,7 +444,6 @@ ohos_static_library("absl_base_static") { include_dirs = [ "${ABSEIL_DIR}/" ] cflags = ABSL_DEFAULT_COPTS public_configs = [ ":absl_public_config" ] - defines = [ "ARK_UI_X" ] deps = [":abseil_cpp_action",] subsystem_name = "${THIRDPARTY_ABSEIL_SUBSYS_NAME}" part_name = "${THIRDPARTY_ABSEIL_PART_NAME}" -- Gitee