From 9c2b1b9b9d9170775358732a04ff65bb65ed6c55 Mon Sep 17 00:00:00 2001
From: zxstty <zhaojiaqi18@huawei.com>
Date: Thu, 9 Nov 2023 11:10:53 +0800
Subject: [PATCH] 0015

---
 .../base/hiviewdfx/hilog/bundle.json          | 37 ++++++++++
 .../hiviewdfx/hilog/interfaces/bundle.json    | 74 +++++++++++++++++++
 .../hilog/interfaces/native/bundle.json       | 37 ++++++++++
 .../interfaces/native/innerkits/BUILD.gn      | 34 +++++++++
 .../hilog/interfaces/native/innerkits/include |  1 +
 5 files changed, 183 insertions(+)
 create mode 100644 openeuler/compiler_gn/base/hiviewdfx/hilog/bundle.json
 create mode 100644 openeuler/compiler_gn/base/hiviewdfx/hilog/interfaces/bundle.json
 create mode 100644 openeuler/compiler_gn/base/hiviewdfx/hilog/interfaces/native/bundle.json
 create mode 100644 openeuler/compiler_gn/base/hiviewdfx/hilog/interfaces/native/innerkits/BUILD.gn
 create mode 120000 openeuler/compiler_gn/base/hiviewdfx/hilog/interfaces/native/innerkits/include

diff --git a/openeuler/compiler_gn/base/hiviewdfx/hilog/bundle.json b/openeuler/compiler_gn/base/hiviewdfx/hilog/bundle.json
new file mode 100644
index 0000000..8bfadc0
--- /dev/null
+++ b/openeuler/compiler_gn/base/hiviewdfx/hilog/bundle.json
@@ -0,0 +1,37 @@
+{
+  "name": "@ohos/hilog",
+  "description": "Native log interface provided for system",
+  "version": "3.1",
+  "license": "Apache License 2.0",
+  "publishAs": "code-segment",
+  "segment": {
+    "destPath": "base/hiviewdfx/hilog"
+  },
+  "dirs": {},
+  "scripts": {},
+  "component": {
+    "name": "hilog",
+    "subsystem": "hiviewdfx",
+    "syscap": [
+      "SystemCapability.HiviewDFX.HiLog"
+    ],
+    "adapted_system_type": [
+      "standard"
+    ],
+    "rom": "188KB",
+    "ram": "2000KB",
+    "deps": {
+      "components": [
+        "init",
+        "utils_base"
+      ],
+      "third_party": [
+        "bounds_checking_function",
+        "zlib"
+      ]
+    },
+    "build": {
+      "sub_component": []
+    }
+  }
+}
diff --git a/openeuler/compiler_gn/base/hiviewdfx/hilog/interfaces/bundle.json b/openeuler/compiler_gn/base/hiviewdfx/hilog/interfaces/bundle.json
new file mode 100644
index 0000000..11eee3f
--- /dev/null
+++ b/openeuler/compiler_gn/base/hiviewdfx/hilog/interfaces/bundle.json
@@ -0,0 +1,74 @@
+{
+  "name": "@ohos/hilog_native",
+  "description": "Native log interface provided for system",
+  "version": "3.1",
+  "license": "Apache License 2.0",
+  "publishAs": "code-segment",
+  "segment": {
+    "destPath": "base/hiviewdfx/hilog"
+  },
+  "dirs": {},
+  "scripts": {},
+  "component": {
+    "name": "hilog_native",
+    "subsystem": "hiviewdfx",
+    "syscap": [
+      "SystemCapability.HiviewDFX.HiLog"
+    ],
+    "adapted_system_type": [
+      "standard"
+    ],
+    "rom": "188KB",
+    "ram": "2000KB",
+    "deps": {
+      "components": [
+        "c_utils",
+        "init",
+        "napi"
+      ],
+      "third_party": [
+        "bounds_checking_function",
+        "zlib"
+      ]
+    },
+    "features": [
+      "hilog_native_feature_ohcore"
+    ],
+    "build": {
+      "group_type": {
+        "base_group": [
+
+        ],
+        "fwk_group": [],
+        "service_group": [
+          "//base/hiviewdfx/hilog/interfaces/native/innerkits:libhilog_base",
+          "//base/hiviewdfx/hilog/interfaces/native/innerkits:libhilog"
+        ]
+      },
+      "inner_kits": [
+        {
+          "name": "//base/hiviewdfx/hilog/interfaces/native/innerkits:libhilog",
+          "header": {
+            "header_files": [
+              "hilog/log.h",
+              "hilog/log_c.h",
+              "hilog/log_cpp.h",
+              "hilog_trace.h"
+            ],
+            "header_base": "//base/hiviewdfx/hilog/interfaces/native/innerkits/include"
+          }
+        },
+        {
+          "name": "//base/hiviewdfx/hilog/interfaces/native/innerkits:libhilog_base",
+          "header": {
+            "header_files": [
+              "hilog_base/log_base.h"
+            ],
+            "header_base": "//base/hiviewdfx/hilog/interfaces/native/innerkits/include"
+          }
+        }
+      ],
+      "test": []
+    }
+  }
+}
diff --git a/openeuler/compiler_gn/base/hiviewdfx/hilog/interfaces/native/bundle.json b/openeuler/compiler_gn/base/hiviewdfx/hilog/interfaces/native/bundle.json
new file mode 100644
index 0000000..d9e1950
--- /dev/null
+++ b/openeuler/compiler_gn/base/hiviewdfx/hilog/interfaces/native/bundle.json
@@ -0,0 +1,37 @@
+{
+  "name": "@ohos/hiviewdfx_hilog_native",
+  "description": "Native log interface provided for system",
+  "version": "3.1",
+  "license": "Apache License 2.0",
+  "publishAs": "code-segment",
+  "segment": {
+    "destPath": "base/hiviewdfx/hilog"
+  },
+  "dirs": {},
+  "scripts": {},
+  "component": {
+    "name": "hiviewdfx_hilog_native",
+    "subsystem": "hiviewdfx",
+    "syscap": [
+      "SystemCapability.HiviewDFX.HiLog"
+    ],
+    "adapted_system_type": [
+      "standard"
+    ],
+    "rom": "188KB",
+    "ram": "2000KB",
+    "deps": {
+      "components": [
+        "init",
+        "utils_base"
+      ],
+      "third_party": [
+        "bounds_checking_function",
+        "zlib"
+      ]
+    },
+    "build": {
+      "sub_component": []
+    }
+  }
+}
\ No newline at end of file
diff --git a/openeuler/compiler_gn/base/hiviewdfx/hilog/interfaces/native/innerkits/BUILD.gn b/openeuler/compiler_gn/base/hiviewdfx/hilog/interfaces/native/innerkits/BUILD.gn
new file mode 100644
index 0000000..bd1f91b
--- /dev/null
+++ b/openeuler/compiler_gn/base/hiviewdfx/hilog/interfaces/native/innerkits/BUILD.gn
@@ -0,0 +1,34 @@
+# Copyright (c) 2021 Huawei Device Co., Ltd.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+import("//build/ohos.gni")
+
+config("libhilog_pub_config") {
+  include_dirs = [ "include" ]
+  libs = ["hilog.z"]
+}
+
+group("libhilog") {
+    public_configs = [ ":libhilog_pub_config" ]
+}
+
+config("libhilog_base_pub_cfg") {
+  include_dirs = [ "include" ]
+}
+
+ohos_prebuilt_static_library("libhilog_base") {
+  source = "/usr/lib64/libhilog_base.a"
+  public_configs = [ ":libhilog_base_pub_cfg" ]
+
+  part_name = "hilog_native"
+  subsystem_name = "hiviewdfx"
+}
diff --git a/openeuler/compiler_gn/base/hiviewdfx/hilog/interfaces/native/innerkits/include b/openeuler/compiler_gn/base/hiviewdfx/hilog/interfaces/native/innerkits/include
new file mode 120000
index 0000000..50b90d9
--- /dev/null
+++ b/openeuler/compiler_gn/base/hiviewdfx/hilog/interfaces/native/innerkits/include
@@ -0,0 +1 @@
+/usr/include/hilog/
\ No newline at end of file
-- 
2.33.0

