From b26710750b97f5ed555ab96686d9626aeac60976 Mon Sep 17 00:00:00 2001 From: ganchuantao Date: Thu, 3 Apr 2025 06:31:39 +0000 Subject: [PATCH] =?UTF-8?q?mac=5Fos=20=E4=B8=AD=E5=A2=9E=E5=8A=A0=E7=BC=96?= =?UTF-8?q?=E8=AF=91=E9=80=89=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: ganchuantao --- BUILD.gn | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/BUILD.gn b/BUILD.gn index ca7e3b0..f607250 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -136,6 +136,9 @@ ohos_static_library("protobuf_lite_static") { "-Wno-sign-compare", "-Wno-deprecated-declarations", ] + if (host_os == "mac") { + cflags_cc += [ "-faligned-allocation" ] + } cflags = [ "-Wno-deprecated-declarations", "-Wno-sign-compare", @@ -299,6 +302,9 @@ ohos_static_library("protobuf_static") { "-Wno-sign-compare", "-Wno-deprecated-declarations", ] + if (host_os == "mac") { + cflags_cc += [ "-faligned-allocation" ] + } cflags = [ "-Wno-sign-compare", "-D HAVE_PTHREAD", -- Gitee