diff --git a/base/BUILD.gn b/base/BUILD.gn index 3742cae4c4d41bb17f84931fb206cb97f5b385e7..794393e014347753f1efe10123d558d52000a333 100644 --- a/base/BUILD.gn +++ b/base/BUILD.gn @@ -23,6 +23,18 @@ config("utils_config") { if (current_os == "mingw") { cflags += [ "-Wno-error=inconsistent-dllimport" ] } +} + +config("private_utils_config") { + visibility = [ ":*" ] + include_dirs = [ + "include", + "//developtools/liblog", + ] + cflags = [] + if (current_os == "mingw") { + cflags += [ "-Wno-error=inconsistent-dllimport" ] + } cflags += [ "-Wno-implicit-fallthrough" ] } @@ -96,14 +108,14 @@ sources_utils = [ ohos_static_library("utilsbase") { sources = sources_utils - configs = [ ":utils_config" ] + configs = [ ":private_utils_config" ] defines = [ "CONFIG_HILOG" ] external_deps = [ "hilog_native:libhilog" ] } ohos_shared_library("utils") { sources = sources_utils - configs = [ ":utils_config" ] + configs = [ ":private_utils_config" ] subsystem_name = "utils" defines = [ "CONFIG_HILOG" ] external_deps = [ "hilog_native:libhilog" ] @@ -159,13 +171,13 @@ securec_sources = [ ohos_static_library("utilsecurec") { sources = securec_sources - configs = [ ":utils_config" ] + configs = [ ":private_utils_config" ] } if (build_public_version) { ohos_shared_library("utilsecurec_shared") { sources = securec_sources - configs = [ ":utils_config" ] + configs = [ ":private_utils_config" ] public_configs = [ ":utils_config" ] part_name = "utils_base" install_images = [