From 11f1426411962a98748108fa05cd0f35c8dcf802 Mon Sep 17 00:00:00 2001 From: suwenxiang Date: Fri, 9 Sep 2022 16:40:06 +0800 Subject: [PATCH] Description: Fix undefined board_chaintool_type resulting in compilation error IssueNo: https://gitee.com/openharmony/third_party_cJSON/issues/I5ODQ6 Feature or Bugfix: Bugfix Binary Source: No Signed-off-by: suwenxiang --- BUILD.gn | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/BUILD.gn b/BUILD.gn index cdecfbe..67e5601 100755 --- a/BUILD.gn +++ b/BUILD.gn @@ -27,15 +27,15 @@ if (defined(ohos_lite)) { } sources = [ "cpp/qrcodegen.cpp" ] include_dirs = [ "//third_party/qrcodegen/cpp" ] - if (board_toolchain_type != "iccarm") { - cflags = [ "-Wall" ] - cflags_cc = cflags - } else { + if (defined(board_toolchain_type) && board_toolchain_type == "iccarm") { cflags = [ "--diag_suppress", "Pe366", ] cflags_cc = cflags + } else { + cflags = [ "-Wall" ] + cflags_cc = cflags } public_configs = [ ":libqrcodegen_config" ] }