diff --git a/jerry-core/BUILD.gn b/jerry-core/BUILD.gn index 879cb6f4898b6ad27ec4315716d51362b69cf9f7..fa3bb1b031f947bfd8d3f1e9bf0b261d211cae89 100644 --- a/jerry-core/BUILD.gn +++ b/jerry-core/BUILD.gn @@ -215,18 +215,27 @@ jerry_core_includes = [ ] jerry_core_defines = [ - "JERRY_GLOBAL_HEAP_SIZE = (128)", - "JERRY_ERROR_MESSAGES = 1", - "JERRY_LINE_INFO = 1", + "JERRY_GLOBAL_HEAP_SIZE=(128)", + "JERRY_ERROR_MESSAGES=1", + "JERRY_LINE_INFO=1", "JERRY_FUNCTION_NAME", "JERRY_FUNCTION_BACKTRACE", - "JERRY_STACK_LIMIT = 0", + "JERRY_STACK_LIMIT=0", ] +config("jerry_core_config") { + if (board_toolchain_type == "iccarm") { + cflags = [ + "--diag_suppress", + "Pa089,Pe111,Pe188,Pe191,Pe546,Pe940", + ] + } +} + if (ohos_kernel_type == "liteos_m") { lite_library("jerry-core_static") { target_type = "static_library" - + public_configs = [ ":jerry_core_config" ] sources = jerry_core_sources include_dirs = jerry_core_includes defines = jerry_core_defines @@ -234,7 +243,7 @@ if (ohos_kernel_type == "liteos_m") { } else { lite_library("jerry-core_shared") { target_type = "shared_library" - + public_configs = [ ":jerry_core_config" ] sources = jerry_core_sources include_dirs = jerry_core_includes defines = jerry_core_defines diff --git a/jerry-ext/BUILD.gn b/jerry-ext/BUILD.gn index 86e634ed6388be62f6d45027742922472f3bda95..53b91721bcebd7fedc4376a03ffa75440f7f8e80 100644 --- a/jerry-ext/BUILD.gn +++ b/jerry-ext/BUILD.gn @@ -51,17 +51,26 @@ jerry_ext_include_dirs = [ "${core_path}/include", ] +config("jerry_ext_config") { + if (board_toolchain_type == "iccarm") { + cflags = [ + "--diag_suppress", + "Pe940", + ] + } +} + if (ohos_kernel_type == "liteos_m") { lite_library("jerry-ext_static") { target_type = "static_library" - + public_configs = [ ":jerry_ext_config" ] sources = jerry_ext_sources include_dirs = jerry_ext_include_dirs } } else { lite_library("jerry-ext_shared") { target_type = "shared_library" - + public_configs = [ ":jerry_ext_config" ] sources = jerry_ext_sources include_dirs = jerry_ext_include_dirs } diff --git a/jerry-libm/BUILD.gn b/jerry-libm/BUILD.gn index 20d0800787ec06cb71d4ad62f680cac228d37d49..12efe17e9790f74b271a9ec5e0aed1f1f5f09e58 100644 --- a/jerry-libm/BUILD.gn +++ b/jerry-libm/BUILD.gn @@ -56,15 +56,26 @@ jerry_libm_sources = [ jerry_libm_include_dirs = [ "include" ] +config("jerry_libm_config") { + if (board_toolchain_type == "iccarm") { + cflags = [ + "--diag_suppress", + "Pe039,Pa089,Pe222", + ] + } +} + if (ohos_kernel_type == "liteos_m") { lite_library("jerry-libm_static") { target_type = "static_library" + public_configs = [ ":jerry_libm_config" ] sources = jerry_libm_sources include_dirs = jerry_libm_include_dirs } } else { lite_library("jerry-libm_shared") { target_type = "shared_library" + public_configs = [ ":jerry_libm_config" ] sources = jerry_libm_sources include_dirs = jerry_libm_include_dirs }