diff --git a/example/BUILD.gn b/example/BUILD.gn index 46fc0c8793a88237db9719f7990c0b2c68744861..779d466ee22f34b95f28bffdf0d5b3ec7b13811a 100644 --- a/example/BUILD.gn +++ b/example/BUILD.gn @@ -24,7 +24,6 @@ if (defined(ohos_lite)) { include_dirs = [ ".", - "$c_utils_include_path", "$faultloggerd_common_path/dfxlog", "$faultloggerd_common_path/dfxutil", "$faultloggerd_interfaces_path/common", @@ -41,6 +40,8 @@ if (defined(ohos_lite)) { "$faultloggerd_interfaces_path/innerkits/faultloggerd_client:libfaultloggerd", "$hilog_lite_deps_path", ] + + external_deps = [ "c_utils:utils" ] } } else { config("dumpcatcherdemo_config") { diff --git a/faultloggerd.gni b/faultloggerd.gni index 36495e8761112b07d92362979e30d73933ff2742..f7518e8171e1fec5730b79b4639d8888197e0502 100644 --- a/faultloggerd.gni +++ b/faultloggerd.gni @@ -33,8 +33,6 @@ declare_args() { if (defined(ohos_lite)) { import("//build/lite/config/component/lite_component.gni") - c_utils_include_path = "//commonlibrary/c_utils/base/include" - c_utils_src_path = "//commonlibrary/c_utils/base/src" if (ohos_kernel_type == "liteos_m") { hilog_lite_include_path = "//base/hiviewdfx/hilog_lite/interfaces/native/kits/hilog_lite" diff --git a/interfaces/innerkits/backtrace/BUILD.gn b/interfaces/innerkits/backtrace/BUILD.gn index 9465d6cc89a46993c3e7733f04fb9b1acbe4dad8..ce68bc851b4c919a074f6330c89e63d41c462be4 100644 --- a/interfaces/innerkits/backtrace/BUILD.gn +++ b/interfaces/innerkits/backtrace/BUILD.gn @@ -25,7 +25,6 @@ if (defined(ohos_lite)) { include_dirs = [ "include", - "$c_utils_include_path", "$faultloggerd_common_path/dfxlog", "$faultloggerd_common_path/dfxutil", "$faultloggerd_interfaces_path/common", @@ -46,6 +45,7 @@ if (defined(ohos_lite)) { external_deps = [ "bounds_checking_function:libsec_shared", + "c_utils:utils", "hilog_lite:hilog_shared", ] } diff --git a/interfaces/innerkits/dump_catcher/BUILD.gn b/interfaces/innerkits/dump_catcher/BUILD.gn index 730473dbe30625c99cf3a545ff4c483d00214110..e4bebcf297d5fb107705ba612aa2783781b30610 100644 --- a/interfaces/innerkits/dump_catcher/BUILD.gn +++ b/interfaces/innerkits/dump_catcher/BUILD.gn @@ -21,7 +21,6 @@ if (defined(ohos_lite)) { include_dirs = [ "include", - "$c_utils_include_path", "$faultloggerd_common_path/dfxlog", "$faultloggerd_common_path/dfxutil", "$faultloggerd_interfaces_path/common", @@ -46,6 +45,7 @@ if (defined(ohos_lite)) { external_deps = [ "bounds_checking_function:libsec_shared", + "c_utils:utils", "hilog_lite:hilog_shared", ] } diff --git a/interfaces/innerkits/faultloggerd_client/BUILD.gn b/interfaces/innerkits/faultloggerd_client/BUILD.gn index b1636347017a8ac97a1b92259f110ce68c0b0e41..5d6772ed35afb34dac8ad23ecb46ecf807f4453e 100644 --- a/interfaces/innerkits/faultloggerd_client/BUILD.gn +++ b/interfaces/innerkits/faultloggerd_client/BUILD.gn @@ -20,7 +20,6 @@ if (defined(ohos_lite)) { include_dirs = [ ".", "include", - "$c_utils_include_path", "$faultloggerd_common_path/cutil", "$faultloggerd_common_path/dfxlog", "$faultloggerd_common_path/dfxutil", @@ -32,7 +31,6 @@ if (defined(ohos_lite)) { "faultloggerd_socket.cpp", ] cflags = [ "-fstack-protector-strong" ] - sources += [ "$c_utils_src_path/directory_ex.cpp" ] deps = [ "$faultloggerd_path/common/cutil:dfx_cutil", @@ -41,6 +39,7 @@ if (defined(ohos_lite)) { ] external_deps = [ + "c_utils:utils", "hilog_lite:hilog_shared", "init:libbegetutil", ] diff --git a/interfaces/innerkits/procinfo/BUILD.gn b/interfaces/innerkits/procinfo/BUILD.gn index 38fc1282170a4e6a6f4287da1592e8dc1a622e67..52d1debcd7d1a9435b8dd57f73701c589e2d2edc 100644 --- a/interfaces/innerkits/procinfo/BUILD.gn +++ b/interfaces/innerkits/procinfo/BUILD.gn @@ -20,21 +20,22 @@ if (defined(ohos_lite)) { include_dirs = [ ".", "include", - "$c_utils_include_path", "$faultloggerd_interfaces_path/common", "$faultloggerd_path/common/dfxutil", "$hilog_lite_include_path", ] sources = [ "procinfo.cpp" ] - sources += [ "$c_utils_src_path/directory_ex.cpp" ] deps = [ "$faultloggerd_path/common/dfxutil:dfx_util", "$hilog_lite_deps_path", ] - external_deps = [ "bounds_checking_function:libsec_shared" ] + external_deps = [ + "c_utils:utils", + "bounds_checking_function:libsec_shared" + ] } } else { config("dfx_procinfo_config") { diff --git a/interfaces/innerkits/signal_handler/BUILD.gn b/interfaces/innerkits/signal_handler/BUILD.gn index cd287677e3e13800f445651e34deec0e27f97b87..0c4dd2dfcf2441c9c994f99d5865cd9ae2772658 100644 --- a/interfaces/innerkits/signal_handler/BUILD.gn +++ b/interfaces/innerkits/signal_handler/BUILD.gn @@ -53,7 +53,6 @@ if (defined(ohos_lite)) { visibility = [ "*:*" ] include_dirs = [ "include", - "$c_utils_include_path", "$faultloggerd_interfaces_path/common", "$faultloggerd_path/common/cutil", "$faultloggerd_path/common/dfxlog", @@ -66,7 +65,10 @@ if (defined(ohos_lite)) { deps = [ "$faultloggerd_path/common/cutil:dfx_cutil" ] - external_deps = [ "bounds_checking_function:libsec_shared" ] + external_deps = [ + "c_utils:utils", + "bounds_checking_function:libsec_shared" + ] cflags = [ "-fPIC", diff --git a/interfaces/innerkits/unwinder/BUILD.gn b/interfaces/innerkits/unwinder/BUILD.gn index 6633df20e817389bf3045c1d8ab59860a25b55e5..08f547741cb3944ad09db0ea75ed88cd40531d02 100644 --- a/interfaces/innerkits/unwinder/BUILD.gn +++ b/interfaces/innerkits/unwinder/BUILD.gn @@ -65,7 +65,6 @@ if (defined(ohos_lite)) { include_dirs = [ "include", - "$c_utils_include_path", "$faultloggerd_common_path/dfxlog", "$faultloggerd_common_path/dfxutil", "$faultloggerd_interfaces_path/common", @@ -76,7 +75,6 @@ if (defined(ohos_lite)) { sources = dfx_unwinder_sources sources += dfx_exidx_sources sources += dfx_dwarf_sources - sources += [ "$c_utils_src_path/directory_ex.cpp" ] deps = [ "$faultloggerd_common_path/dfxlog:dfx_hilog", @@ -85,7 +83,10 @@ if (defined(ohos_lite)) { "$hilog_lite_deps_path", ] - external_deps = [ "bounds_checking_function:libsec_shared" ] + external_deps = [ + "c_utils:utils", + "bounds_checking_function:libsec_shared" + ] } static_library("libunwinder_static") { @@ -95,7 +96,6 @@ if (defined(ohos_lite)) { include_dirs = [ "include", - "$c_utils_include_path", "$faultloggerd_common_path/dfxlog", "$faultloggerd_common_path/dfxutil", "$faultloggerd_interfaces_path/common", @@ -106,7 +106,6 @@ if (defined(ohos_lite)) { sources = dfx_unwinder_sources sources += dfx_exidx_sources sources += dfx_dwarf_sources - sources += [ "$c_utils_src_path/directory_ex.cpp" ] deps = [ "$faultloggerd_common_path/dfxlog:dfx_hilog", @@ -114,7 +113,10 @@ if (defined(ohos_lite)) { "$faultloggerd_common_path/trace:dfx_trace_dlsym", "$hilog_lite_deps_path", ] - external_deps = [ "bounds_checking_function:libsec_shared" ] + external_deps = [ + "c_utils:utils", + "bounds_checking_function:libsec_shared" + ] } static_library("unwinder_host") { diff --git a/services/BUILD.gn b/services/BUILD.gn index 56aae68925129e21f8040e09e89b8a31c0e82fcc..a98286ef725909ec2b3c229a7ffa49b1b90e3462 100644 --- a/services/BUILD.gn +++ b/services/BUILD.gn @@ -36,7 +36,6 @@ if (defined(ohos_lite)) { include_dirs = [ ".", - "$c_utils_include_path", "$faultloggerd_interfaces_path/common", "$faultloggerd_path/common/dfxlog", "$faultloggerd_path/common/dfxutil", @@ -47,7 +46,6 @@ if (defined(ohos_lite)) { ] sources = faultloggerd_sources - sources += [ "$c_utils_src_path/directory_ex.cpp" ] cflags = [ "-fstack-protector-strong" ] @@ -59,7 +57,10 @@ if (defined(ohos_lite)) { "$faultloggerd_path/interfaces/innerkits/faultloggerd_client:libfaultloggerd", ] - external_deps = [ "hilog_lite:hilog_shared" ] + external_deps = [ + "c_utils:utils", + "hilog_lite:hilog_shared" + ] defines = [ "is_ohos_lite" ] if (faultloggerd_hisysevent_enable) { diff --git a/test/performancetest/BUILD.gn b/test/performancetest/BUILD.gn index 636e565da423e72defa7cf69bc776a9623b96585..71ca1d56255793520468ee5b794bab068cc1c51e 100644 --- a/test/performancetest/BUILD.gn +++ b/test/performancetest/BUILD.gn @@ -25,7 +25,6 @@ if (defined(ohos_lite)) { include_dirs = [ "include/", - "$c_utils_include_path", "$faultloggerd_interfaces_path/common", "$faultloggerd_interfaces_path/innerkits/procinfo/include", "$faultloggerd_interfaces_path/innerkits/faultloggerd_client/include", @@ -40,7 +39,10 @@ if (defined(ohos_lite)) { "$faultloggerd_path/test/utils:dfx_test_util", ] - external_deps = [ "hilog_lite:hilog_shared" ] + external_deps = [ + "c_utils:utils", + "hilog_lite:hilog_shared" + ] } } diff --git a/test/systemtest/BUILD.gn b/test/systemtest/BUILD.gn index 70525d3019348ed5b464e0557af204ff597e4292..5042a21f91ba0ca07ee9d59a294f7dc94f1b2ee4 100644 --- a/test/systemtest/BUILD.gn +++ b/test/systemtest/BUILD.gn @@ -25,10 +25,8 @@ if (defined(ohos_lite)) { "dumpcatcher_system_test.cpp", "faultloggerd_system_test.cpp", ] - sources += [ "$c_utils_src_path/directory_ex.cpp" ] include_dirs = [ - "$c_utils_include_path", "$faultloggerd_common_path/dfxutil", "$faultloggerd_interfaces_path/innerkits/backtrace/include", "$faultloggerd_path/interfaces/common", @@ -45,7 +43,10 @@ if (defined(ohos_lite)) { "$faultloggerd_path/test/utils:dfx_test_util", ] - external_deps = [ "hilog_lite:hilog_shared" ] + external_deps = [ + "c_utils:utils", + "hilog_lite:hilog_shared" + ] } } diff --git a/test/unittest/common/BUILD.gn b/test/unittest/common/BUILD.gn index 9cea7974e465e170b53598cda2cf18791cda0996..df05e671733528374d535872b829c8c58349467b 100644 --- a/test/unittest/common/BUILD.gn +++ b/test/unittest/common/BUILD.gn @@ -23,7 +23,6 @@ if (defined(ohos_lite)) { output_dir = "$root_out_dir/test/unittest/faultloggerd" include_dirs = [ - "$c_utils_include_path", "$hilog_lite_include_path", "$faultloggerd_interfaces_path/common", "$faultloggerd_path/common/dfxlog", @@ -38,6 +37,7 @@ if (defined(ohos_lite)) { "$faultloggerd_path/interfaces/innerkits/faultloggerd_client:libfaultloggerd", "$hilog_lite_deps_path", ] + external_deps = [ "c_utils:utils" ] } } diff --git a/test/unittest/process_dump/BUILD.gn b/test/unittest/process_dump/BUILD.gn index 212de72210140ee471e6128908553a6924615714..6a8b5e31fe47eb6ca767be41aed9039383a64b9b 100644 --- a/test/unittest/process_dump/BUILD.gn +++ b/test/unittest/process_dump/BUILD.gn @@ -23,7 +23,6 @@ if (defined(ohos_lite)) { output_dir = "$root_out_dir/test/unittest/faultloggerd" include_dirs = [ - "$c_utils_include_path", "$faultloggerd_common_path/dfxutil", "$faultloggerd_interfaces_path/common", "$faultloggerd_interfaces_path/innerkits/procinfo/include", @@ -37,7 +36,6 @@ if (defined(ohos_lite)) { "multithread_constructor.c", "process_dump_test.cpp", ] - sources += [ "$c_utils_src_path/directory_ex.cpp" ] deps = [ "$faultloggerd_interfaces_path/innerkits/procinfo:libdfx_procinfo", @@ -46,7 +44,10 @@ if (defined(ohos_lite)) { "$faultloggerd_path/tools/process_dump:process_info_src", ] - external_deps = [ "hilog_lite:hilog_shared" ] + external_deps = [ + "c_utils:utils", + "hilog_lite:hilog_shared" + ] } } diff --git a/test/unittest/procinfo/BUILD.gn b/test/unittest/procinfo/BUILD.gn index 0ec54f7ea842e373aadac84506f836b4adbccbc6..f29fa7d0fb6a41fb7d236ca7f34f6f7cc43f0048 100644 --- a/test/unittest/procinfo/BUILD.gn +++ b/test/unittest/procinfo/BUILD.gn @@ -23,7 +23,6 @@ if (defined(ohos_lite)) { output_dir = "$root_out_dir/test/unittest/faultloggerd" include_dirs = [ - "$c_utils_include_path", "$faultloggerd_interfaces_path/common", "$faultloggerd_path/common/dfxlog", "$faultloggerd_path/common/dfxutil", @@ -39,6 +38,7 @@ if (defined(ohos_lite)) { "$faultloggerd_path/interfaces/innerkits/procinfo:libdfx_procinfo", "$hilog_lite_deps_path", ] + external_deps = [ "c_utils:utils" ] } } diff --git a/test/unittest/services/BUILD.gn b/test/unittest/services/BUILD.gn index e9c628b2af2f058d9290bbfd4cbbaef778662fd0..d1189b6c274021b06ceb2df5124f5bdfc7c521ce 100644 --- a/test/unittest/services/BUILD.gn +++ b/test/unittest/services/BUILD.gn @@ -23,7 +23,6 @@ if (defined(ohos_lite)) { output_dir = "$root_out_dir/test/unittest/faultloggerd" include_dirs = [ - "$c_utils_include_path", "$faultloggerd_path/services", "$hilog_lite_include_path", "$faultloggerd_path/tools/process_dump", @@ -44,7 +43,6 @@ if (defined(ohos_lite)) { "$faultloggerd_path/services/fault_logger_pipe.cpp", "faultlogger_config_test.cpp", ] - sources += [ "$c_utils_src_path/directory_ex.cpp" ] deps = [ "$faultloggerd_common_path/trace:dfx_trace", @@ -55,6 +53,7 @@ if (defined(ohos_lite)) { ] external_deps = [ + "c_utils:utils", "hilog_lite:hilog_shared", "init:libbegetutil", ] diff --git a/test/utils/BUILD.gn b/test/utils/BUILD.gn index 1d602f0f8146ef1a07aae4f7d4143fbe71c3a3ce..27b994d95c17b5c50cd81989a810f3e79413cc02 100644 --- a/test/utils/BUILD.gn +++ b/test/utils/BUILD.gn @@ -20,13 +20,13 @@ if (defined(ohos_lite)) { visibility = [ "*:*" ] include_dirs = [ ".", - "$c_utils_include_path", "$hilog_lite_include_path", "$faultloggerd_interfaces_path/common", "$faultloggerd_path/common/dfxutil", ] sources = dfx_test_util_sources deps = [ "$hilog_lite_deps_path" ] + external_deps = [ "c_utils:utils" ] } } else { ohos_static_library("dfx_test_util") { diff --git a/tools/process_dump/BUILD.gn b/tools/process_dump/BUILD.gn index 8779daefecd446d7abca2fd818b27f1cbe2e80a8..02e4862de2c7c8f3ce20acad6dad96431271a05f 100644 --- a/tools/process_dump/BUILD.gn +++ b/tools/process_dump/BUILD.gn @@ -41,7 +41,6 @@ if (defined(ohos_lite)) { include_dirs = [ ".", - "$c_utils_include_path", "$faultloggerd_common_path/dfxlog", "$faultloggerd_common_path/dfxutil", "$faultloggerd_interfaces_path/common", @@ -74,6 +73,7 @@ if (defined(ohos_lite)) { "$faultloggerd_interfaces_path/innerkits/unwinder:libunwinder", ] external_deps = [ "hilog_lite:hilog_shared" ] + public_external_deps = [ "c_utils:utils" ] } executable("processdump") { @@ -97,6 +97,7 @@ if (defined(ohos_lite)) { ] external_deps = [ "hilog_lite:hilog_shared" ] + public_external_deps = [ "c_utils:utils" ] } } else { config("processdump_config") {