diff --git a/BUILD.gn b/BUILD.gn index 4a23d53a8e4ff40ecd74b928e6664d643c9bcb3d..f544e2e569c0f54b50cbfa736d052511bf90da63 100755 --- a/BUILD.gn +++ b/BUILD.gn @@ -15,13 +15,6 @@ if (defined(ohos_lite)) { } config("harfbuzz_config") { include_dirs = [ "//third_party/harfbuzz/src" ] - if (board_toolchain_type == "iccarm") { - cflags = [ - "--diag_suppress", - "Pa068,Pa093,Pe111,Pa181,Pe128,Pe161,Pe177,Pe185,Pe186,Pe550,Pe554", - ] - cflags_cc = cflags - } } harfbuzz_source = [ @@ -82,6 +75,13 @@ if (defined(ohos_lite)) { sources = harfbuzz_source defines = [ "HAVE_PTHREAD = 1" ] public_configs = [ ":harfbuzz_config" ] + if (board_toolchain_type == "iccarm") { + cflags = [ + "--diag_suppress", + "Pa068,Pa093,Pe111,Pa181,Pe128,Pe161,Pe177,Pe185,Pe186,Pe550,Pe554", + ] + cflags_cc = cflags + } } } else { ohos_static_library("harfbuzz_static") {