Remove set_sources_assignment_filter and delete some redundant patchs

This commit is contained in:
s_c_c 2024-08-06 11:01:00 +08:00
parent 57782ade71
commit 4d3582c028
8 changed files with 230 additions and 1908 deletions

View File

@ -1,59 +0,0 @@
From 7526b048d75a773274144236209eea422e2307c5 Mon Sep 17 00:00:00 2001
From: tian hang <tian_hang@hoperun.com>
Date: Fri, 19 May 2023 09:34:27 +0000
Subject: [PATCH 10/11] feat:use include/samgr for samgr include files config
---
.../systemabilitymgr/samgr/interfaces/innerkits/common/BUILD.gn | 2 --
.../systemabilitymgr/samgr/interfaces/innerkits/common/include | 2 +-
.../samgr/interfaces/innerkits/samgr_proxy/include | 2 +-
.../foundation/systemabilitymgr/samgr/services/lsamgr/include | 2 +-
4 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/openeuler/compiler_gn/foundation/systemabilitymgr/samgr/interfaces/innerkits/common/BUILD.gn b/openeuler/compiler_gn/foundation/systemabilitymgr/samgr/interfaces/innerkits/common/BUILD.gn
index a129d8b..bf8ddb3 100644
--- a/openeuler/compiler_gn/foundation/systemabilitymgr/samgr/interfaces/innerkits/common/BUILD.gn
+++ b/openeuler/compiler_gn/foundation/systemabilitymgr/samgr/interfaces/innerkits/common/BUILD.gn
@@ -27,7 +27,6 @@ config("config_samgr_common") {
libs = ["samgr_common",]
}
-################################################################################
group("samgr_common") {
public_configs = [ ":config_samgr_common" ]
@@ -35,4 +34,3 @@ group("samgr_common") {
all_dependent_configs = [ ":all_config_samgr_common" ]
}
-################################################################################
diff --git a/openeuler/compiler_gn/foundation/systemabilitymgr/samgr/interfaces/innerkits/common/include b/openeuler/compiler_gn/foundation/systemabilitymgr/samgr/interfaces/innerkits/common/include
index bc414ef..fa4da59 120000
--- a/openeuler/compiler_gn/foundation/systemabilitymgr/samgr/interfaces/innerkits/common/include
+++ b/openeuler/compiler_gn/foundation/systemabilitymgr/samgr/interfaces/innerkits/common/include
@@ -1 +1 @@
-/usr/include/
\ No newline at end of file
+/usr/include/samgr/
\ No newline at end of file
diff --git a/openeuler/compiler_gn/foundation/systemabilitymgr/samgr/interfaces/innerkits/samgr_proxy/include b/openeuler/compiler_gn/foundation/systemabilitymgr/samgr/interfaces/innerkits/samgr_proxy/include
index bc414ef..fa4da59 120000
--- a/openeuler/compiler_gn/foundation/systemabilitymgr/samgr/interfaces/innerkits/samgr_proxy/include
+++ b/openeuler/compiler_gn/foundation/systemabilitymgr/samgr/interfaces/innerkits/samgr_proxy/include
@@ -1 +1 @@
-/usr/include/
\ No newline at end of file
+/usr/include/samgr/
\ No newline at end of file
diff --git a/openeuler/compiler_gn/foundation/systemabilitymgr/samgr/services/lsamgr/include b/openeuler/compiler_gn/foundation/systemabilitymgr/samgr/services/lsamgr/include
index bc414ef..fa4da59 120000
--- a/openeuler/compiler_gn/foundation/systemabilitymgr/samgr/services/lsamgr/include
+++ b/openeuler/compiler_gn/foundation/systemabilitymgr/samgr/services/lsamgr/include
@@ -1 +1 @@
-/usr/include/
\ No newline at end of file
+/usr/include/samgr/
\ No newline at end of file
--
2.33.0

View File

@ -1,47 +0,0 @@
From 9801c82c2e5f8f2fd20115c3af413d912d305e4b Mon Sep 17 00:00:00 2001
From: tian hang <tian_hang@hoperun.com>
Date: Fri, 19 May 2023 09:37:15 +0000
Subject: [PATCH 11/11] feat:use .z for libs name
---
.../samgr/interfaces/innerkits/common/BUILD.gn | 4 ++--
.../samgr/interfaces/innerkits/samgr_proxy/BUILD.gn | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/openeuler/compiler_gn/foundation/systemabilitymgr/samgr/interfaces/innerkits/common/BUILD.gn b/openeuler/compiler_gn/foundation/systemabilitymgr/samgr/interfaces/innerkits/common/BUILD.gn
index bf8ddb3..4b46680 100644
--- a/openeuler/compiler_gn/foundation/systemabilitymgr/samgr/interfaces/innerkits/common/BUILD.gn
+++ b/openeuler/compiler_gn/foundation/systemabilitymgr/samgr/interfaces/innerkits/common/BUILD.gn
@@ -17,14 +17,14 @@ config("all_config_samgr_common") {
include_dirs = [
"include",
]
- libs = ["samgr_common",]
+ libs = ["samgr_common.z",]
}
config("config_samgr_common") {
include_dirs = [
"include",
]
- libs = ["samgr_common",]
+ libs = ["samgr_common.z",]
}
group("samgr_common") {
diff --git a/openeuler/compiler_gn/foundation/systemabilitymgr/samgr/interfaces/innerkits/samgr_proxy/BUILD.gn b/openeuler/compiler_gn/foundation/systemabilitymgr/samgr/interfaces/innerkits/samgr_proxy/BUILD.gn
index 44b42ad..b68ec17 100644
--- a/openeuler/compiler_gn/foundation/systemabilitymgr/samgr/interfaces/innerkits/samgr_proxy/BUILD.gn
+++ b/openeuler/compiler_gn/foundation/systemabilitymgr/samgr/interfaces/innerkits/samgr_proxy/BUILD.gn
@@ -20,7 +20,7 @@ config("samgr_proxy_config") {
"//third_party/libxml2/include",
]
- libs = ["samgr_proxy",]
+ libs = ["samgr_proxy.z",]
}
#config("samgr_proxy_private_config") {
--
2.33.0

View File

@ -1,158 +0,0 @@
From 9bef986150282fb772966baaf947f7a7cbd82301 Mon Sep 17 00:00:00 2001
From: zxstty <zhaojiaqi18@huawei.com>
Date: Wed, 8 Nov 2023 18:22:52 +0800
Subject: [PATCH] 0018
---
.../systemabilitymgr/safwk/bundle.json | 58 +++++++++++++++++++
.../safwk/interfaces/innerkits/safwk/BUILD.gn | 41 +++++++++++++
.../safwk/services/safwk/BUILD.gn | 22 +++++++
3 files changed, 121 insertions(+)
create mode 100644 openeuler/compiler_gn/foundation/systemabilitymgr/safwk/bundle.json
create mode 100644 openeuler/compiler_gn/foundation/systemabilitymgr/safwk/interfaces/innerkits/safwk/BUILD.gn
create mode 100644 openeuler/compiler_gn/foundation/systemabilitymgr/safwk/services/safwk/BUILD.gn
diff --git a/openeuler/compiler_gn/foundation/systemabilitymgr/safwk/bundle.json b/openeuler/compiler_gn/foundation/systemabilitymgr/safwk/bundle.json
new file mode 100644
index 0000000..1964532
--- /dev/null
+++ b/openeuler/compiler_gn/foundation/systemabilitymgr/safwk/bundle.json
@@ -0,0 +1,58 @@
+{
+ "name": "@ohos/systemabilitymgr_safwk",
+ "description": "system ability framework",
+ "homePage": "https://gitee.com/openharmony",
+ "version": "3.1",
+ "license": "Apache License 2.0",
+ "repository": "https://gitee.com/openharmony/systemabilitymgr_safwk",
+ "publishAs": "code-segment",
+ "segment": {
+ "destPath": "foundation/systemabilitymgr/safwk"
+ },
+ "dirs": {},
+ "scripts": {},
+ "component": {
+ "name": "safwk",
+ "subsystem": "systemabilitymgr",
+ "features": [ "safwk_feature_coverage = false" ],
+ "adapted_system_type": [
+ "standard"
+ ],
+ "rom": "200KB",
+ "ram": "7130KB",
+ "deps": {
+ "components": [
+ "hitrace_native",
+ "hiviewdfx_hilog_native",
+ "ipc",
+ "samgr",
+ "c_utils"
+ ],
+ "third_party": [ "libxml2" ]
+ },
+ "build": {
+ "group_type": {
+ "base_group": [
+ "//foundation/systemabilitymgr/safwk/services/safwk:sa_main",
+ "//foundation/systemabilitymgr/safwk/interfaces/innerkits/safwk:system_ability_fwk"
+ ],
+ "fwk_group": [],
+ "service_group": []
+ },
+ "inner_kits": [
+ {
+ "header": {
+ "header_base": "//foundation/systemabilitymgr/safwk/interfaces/innerkits/safwk",
+ "header_files": [
+ "system_ability.h"
+ ]
+ },
+ "name": "//foundation/systemabilitymgr/safwk/interfaces/innerkits/safwk:system_ability_fwk"
+ }
+ ],
+ "test": [
+ "//foundation/systemabilitymgr/safwk/test:unittest"
+ ]
+ }
+ }
+}
diff --git a/openeuler/compiler_gn/foundation/systemabilitymgr/safwk/interfaces/innerkits/safwk/BUILD.gn b/openeuler/compiler_gn/foundation/systemabilitymgr/safwk/interfaces/innerkits/safwk/BUILD.gn
new file mode 100644
index 0000000..57dcce2
--- /dev/null
+++ b/openeuler/compiler_gn/foundation/systemabilitymgr/safwk/interfaces/innerkits/safwk/BUILD.gn
@@ -0,0 +1,41 @@
+# 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")
+import("//build/ohos_var.gni")
+
+# 建立所需头文件链接
+exec_script("//build/openeuler/script/link.py", [ "--src_target", "/usr/include/safwk/system_ability.h", "--dest_target",
+ rebase_path("//foundation/systemabilitymgr/safwk/interfaces/innerkits/safwk/system_ability.h") ], "string")
+
+exec_script("//build/openeuler/script/link.py", [ "--src_target", "/usr/include/safwk", "--dest_target",
+ rebase_path("//foundation/systemabilitymgr/safwk/services/safwk/include") ], "string")
+
+config("system_ability_config") {
+ visibility = [ ":*" ]
+ include_dirs = [
+ "../../../services/safwk/include",
+ "//foundation/systemabilitymgr/safwk/interfaces/innerkits/safwk",
+ ]
+}
+
+ohos_prebuilt_shared_library("system_ability_fwk") {
+ source = "/usr/lib64/libsystem_ability_fwk.z.so"
+
+ public_configs = [ ":system_ability_config" ]
+
+ install_images = [ system_base_dir ]
+ relative_install_dir = "platformsdk"
+ part_name = "safwk"
+ subsystem_name = "systemabilitymgr"
+}
\ No newline at end of file
diff --git a/openeuler/compiler_gn/foundation/systemabilitymgr/safwk/services/safwk/BUILD.gn b/openeuler/compiler_gn/foundation/systemabilitymgr/safwk/services/safwk/BUILD.gn
new file mode 100644
index 0000000..a258444
--- /dev/null
+++ b/openeuler/compiler_gn/foundation/systemabilitymgr/safwk/services/safwk/BUILD.gn
@@ -0,0 +1,22 @@
+# 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")
+
+ohos_prebuilt_executable("sa_main") {
+ source = "/usr/bin/sa_main"
+ install_enable = true
+
+ part_name = "safwk"
+ subsystem_name = "systemabilitymgr"
+}
\ No newline at end of file
--
2.33.0

View File

@ -1,171 +0,0 @@
From c3dff0469668eb1589203ca1275aac86268f21ad Mon Sep 17 00:00:00 2001
From: zxstty <zhaojiaqi18@huawei.com>
Date: Wed, 8 Nov 2023 18:22:52 +0800
Subject: [PATCH] 0019
---
.../device_manager/BUILD.gn | 17 ++++
.../device_manager/bundle.json | 80 +++++++++++++++++++
.../interfaces/inner_kits/native_cpp/BUILD.gn | 39 +++++++++
3 files changed, 136 insertions(+)
create mode 100644 openeuler/compiler_gn/foundation/distributedhardware/device_manager/BUILD.gn
create mode 100644 openeuler/compiler_gn/foundation/distributedhardware/device_manager/bundle.json
create mode 100644 openeuler/compiler_gn/foundation/distributedhardware/device_manager/interfaces/inner_kits/native_cpp/BUILD.gn
diff --git a/openeuler/compiler_gn/foundation/distributedhardware/device_manager/BUILD.gn b/openeuler/compiler_gn/foundation/distributedhardware/device_manager/BUILD.gn
new file mode 100644
index 0000000..df46546
--- /dev/null
+++ b/openeuler/compiler_gn/foundation/distributedhardware/device_manager/BUILD.gn
@@ -0,0 +1,17 @@
+# Copyright (c) 2022 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.
+group("device_manager_fwk") {
+ deps = [
+ "interfaces/inner_kits/native_cpp:devicemanagersdk",
+ ]
+}
diff --git a/openeuler/compiler_gn/foundation/distributedhardware/device_manager/bundle.json b/openeuler/compiler_gn/foundation/distributedhardware/device_manager/bundle.json
new file mode 100644
index 0000000..51c3d9a
--- /dev/null
+++ b/openeuler/compiler_gn/foundation/distributedhardware/device_manager/bundle.json
@@ -0,0 +1,80 @@
+{
+ "name": "@ohos/device_manager",
+ "description": "device manager service",
+ "version": "3.1",
+ "license": "Apache License 2.0",
+ "repository": "https://gitee.com/openharmony/device_manager",
+ "publishAs": "code-segment",
+ "segment": {
+ "destPath": "foundation/distributedhardware/device_manager"
+ },
+ "dirs": {},
+ "scripts": {},
+ "component": {
+ "name": "device_manager",
+ "subsystem": "distributedhardware",
+ "syscap":[ "SystemCapability.DistributedHardware.DeviceManager" ],
+ "features":["device_manager_no_interaction_auth"],
+ "adapted_system_type": [ "standard", "small" ],
+ "rom": "2M",
+ "ram": "16M",
+ "hisysevent_config": [
+ "//foundation/distributedhardware/device_manager/hisysevent.yaml"
+ ],
+ "deps": {
+ "components": [
+ "ability_base",
+ "ability_runtime",
+ "access_token",
+ "appexecfwk_standard",
+ "bundle_framework",
+ "c_utils",
+ "common_event_service",
+ "device_auth",
+ "dsoftbus",
+ "hisysevent_native",
+ "hitrace_native",
+ "hiviewdfx_hilog_native",
+ "init",
+ "ipc",
+ "napi",
+ "os_account",
+ "safwk",
+ "samgr",
+ "startup_l2"
+ ],
+ "third_party": [
+ "json",
+ "node",
+ "googletest",
+ "mbedtls"
+ ]
+ },
+ "build": {
+ "group_type": {
+ "base_group": [],
+ "fwk_group": [
+ "//foundation/distributedhardware/device_manager:device_manager_fwk"
+ ],
+ "service_group": []
+ },
+ "inner_kits": [
+ {
+ "type": "so",
+ "name": "//foundation/distributedhardware/device_manager/interfaces/inner_kits/native_cpp:devicemanagersdk",
+ "header": {
+ "header_files": [
+ "device_manager.h",
+ "device_manager_callback.h",
+ "dm_device_info.h",
+ "dm_publish_info.h",
+ "dm_subscribe_info.h"
+ ],
+ "header_base": "//foundation/distributedhardware/device_manager/interfaces/inner_kits/native_cpp/include"
+ }
+ }
+ ],
+ "test": []
+ }
+ }
+}
diff --git a/openeuler/compiler_gn/foundation/distributedhardware/device_manager/interfaces/inner_kits/native_cpp/BUILD.gn b/openeuler/compiler_gn/foundation/distributedhardware/device_manager/interfaces/inner_kits/native_cpp/BUILD.gn
new file mode 100644
index 0000000..78c60d7
--- /dev/null
+++ b/openeuler/compiler_gn/foundation/distributedhardware/device_manager/interfaces/inner_kits/native_cpp/BUILD.gn
@@ -0,0 +1,39 @@
+# Copyright (c) 2022 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")
+
+exec_script("//build/openeuler/script/link.py", [ "--src_target", "/usr/include/device_manager", "--dest_target",
+ rebase_path("//foundation/distributedhardware/device_manager/interfaces/inner_kits/native_cpp/include") ], "string")
+
+config("devicemanagersdk_config") {
+ include_dirs = [
+ "include",
+ "include/ipc",
+ "include/ipc/standard",
+ "include/notify",
+ "include/common/include",
+ "include/common/include/ipc",
+ "include/common/include/ipc/model",
+ "include/common/include/ipc/standard",
+ "include/common/include/dfx",
+ "include/common/include/dfx/standard",
+ ]
+}
+
+ohos_prebuilt_shared_library("devicemanagersdk") {
+ source = "/usr/lib64/libdevicemanagersdk.z.so"
+ public_configs = [ ":devicemanagersdk_config" ]
+
+ subsystem_name = "distributedhardware"
+ part_name = "device_manager"
+}
--
2.33.0

File diff suppressed because it is too large Load Diff

View File

@ -1,42 +0,0 @@
From efc0ea7fc6de6853c2bc6157f1f8a66c671531e4 Mon Sep 17 00:00:00 2001
From: heppen <hepeng68@huawei.com>
Date: Fri, 4 Aug 2023 11:45:16 +0800
Subject: [PATCH] change clang compiler path
---
config/clang/clang.gni | 4 ++--
toolchain/gcc_toolchain.gni | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/config/clang/clang.gni b/config/clang/clang.gni
index 9728e12..f00283c 100755
--- a/config/clang/clang.gni
+++ b/config/clang/clang.gni
@@ -4,9 +4,9 @@
import("//build/toolchain/toolchain.gni")
-default_clang_base_path = "/usr/lib64/llvm15/"
+default_clang_base_path = "/usr/"
clang_lib_path =
- "${default_clang_base_path}/lib/clang/15.0.7/lib"
+ "/usr/lib64"
declare_args() {
# Indicates if the build should use the Chrome-specific plugins for enforcing
diff --git a/toolchain/gcc_toolchain.gni b/toolchain/gcc_toolchain.gni
index 6a68e42..0c91ccf 100755
--- a/toolchain/gcc_toolchain.gni
+++ b/toolchain/gcc_toolchain.gni
@@ -585,7 +585,7 @@ template("clang_toolchain") {
gcc_toolchain(target_name) {
# prefix = rebase_path("$clang_base_path/bin", root_build_dir)
- prefix = "/usr/lib64/llvm15/bin"
+ prefix = "/usr/bin"
cc = "$prefix/clang"
cxx = "$prefix/clang++"
ld = cxx
--
2.33.0

View File

@ -0,0 +1,225 @@
From 4fa15c6cb583d35026ef0e35b3077a458b4d69fb Mon Sep 17 00:00:00 2001
From: s_c_c <shichuchao@huawei.com>
Date: Mon, 29 Jul 2024 11:00:02 +0800
Subject: [PATCH] feat support gn upgrade
---
config/BUILDCONFIG.gn | 2 +-
config/ohos/copy_ex.gni | 2 +-
config/python.gni | 17 ++++++++++-------
config/sanitizers/BUILD.gn | 2 +-
ohos/ndk/ndk.gni | 7 ++++---
ohos/sdk/sdk.gni | 2 +-
templates/cxx/prebuilt.gni | 8 ++++----
templates/metadata/module_info.gni | 10 ++++++----
8 files changed, 28 insertions(+), 22 deletions(-)
diff --git a/config/BUILDCONFIG.gn b/config/BUILDCONFIG.gn
index 280894e..2229b1c 100644
--- a/config/BUILDCONFIG.gn
+++ b/config/BUILDCONFIG.gn
@@ -554,7 +554,7 @@ if (!is_ohos) {
sources_assignment_filter += []
}
-set_sources_assignment_filter(sources_assignment_filter)
+# set_sources_assignment_filter(sources_assignment_filter)
if (is_standard_system) {
file_exist = exec_script("//build/scripts/check_file_exist.py",
[ "${device_build_path}/config.gni" ],
diff --git a/config/ohos/copy_ex.gni b/config/ohos/copy_ex.gni
index 306c452..ff2396c 100644
--- a/config/ohos/copy_ex.gni
+++ b/config/ohos/copy_ex.gni
@@ -22,7 +22,7 @@ import("//build/config/python.gni")
# outputs, testonly, visibility.
#
template("copy_ex") {
- set_sources_assignment_filter([])
+ # set_sources_assignment_filter([])
action_with_pydeps(target_name) {
forward_variables_from(invoker,
[
diff --git a/config/python.gni b/config/python.gni
index 79ddcb5..b59c7c4 100644
--- a/config/python.gni
+++ b/config/python.gni
@@ -44,8 +44,9 @@ template("python_library") {
_py_files = read_file(invoker.pydeps_file, "list lines")
# Filter out comments.
- set_sources_assignment_filter([ "#*" ])
+ # set_sources_assignment_filter([ "#*" ])
sources = _py_files
+ sources = filter_exclude(sources, [ "#*" ])
# Even though the .pydep file is not used at runtime, it must be added
# so that "gn analyze" will mark the target as changed when .py files
@@ -85,10 +86,11 @@ template("action_with_pydeps") {
if (defined(sources)) {
_old_sources = sources
}
- set_sources_assignment_filter([ "#*" ])
- sources = _pydeps_raw
+ # set_sources_assignment_filter([ "#*" ])
+ # sources = _pydeps_raw
+ sources = filter_exclude(_pydeps_raw, [ "#*" ])
_pydeps = sources
- set_sources_assignment_filter([])
+ # set_sources_assignment_filter([])
sources = _old_sources
action(target_name) {
@@ -130,10 +132,11 @@ template("action_foreach_with_pydeps") {
if (defined(sources)) {
_old_sources = sources
}
- set_sources_assignment_filter([ "#*" ])
- sources = _pydeps_raw
+ # set_sources_assignment_filter([ "#*" ])
+ # sources = _pydeps_raw
+ sources = filter_exclude(_pydeps_raw, [ "#*" ])
_pydeps = sources
- set_sources_assignment_filter([])
+ # set_sources_assignment_filter([])
sources = _old_sources
action_foreach(target_name) {
diff --git a/config/sanitizers/BUILD.gn b/config/sanitizers/BUILD.gn
index d2f0863..2fa841d 100644
--- a/config/sanitizers/BUILD.gn
+++ b/config/sanitizers/BUILD.gn
@@ -73,7 +73,7 @@ if ((is_mac || is_win || !use_xcode_clang || is_ohos) && using_sanitizer) {
"$clang_base_path/lib/clang/$clang_version/lib/$_clang_rt_dso_path"
copy("copy_asan_runtime") {
- set_sources_assignment_filter([])
+ # set_sources_assignment_filter([])
sources = [ _clang_rt_dso_full_path ]
outputs = [ "$root_out_dir/{{source_file_part}}" ]
}
diff --git a/ohos/ndk/ndk.gni b/ohos/ndk/ndk.gni
index 58148f0..8533224 100644
--- a/ohos/ndk/ndk.gni
+++ b/ohos/ndk/ndk.gni
@@ -262,14 +262,15 @@ template("ohos_ndk_copy") {
}
_dest = invoker.dest_dir
- set_sources_assignment_filter([ "*os-irrelevant*" ])
- sources = [ _dest ]
+ # set_sources_assignment_filter([ "*os-irrelevant*" ])
+ # sources = [ _dest ]
+ sources = filter_exclude([ _dest ], [ "*os-irrelevant*" ])
if (sources == []) {
_notice_rel_dir = ndk_os_irrelevant_out_dir
} else {
_notice_rel_dir = ndk_os_specific_out_dir
}
- set_sources_assignment_filter([])
+ # set_sources_assignment_filter([])
sources = []
_main_target_name = target_name
diff --git a/ohos/sdk/sdk.gni b/ohos/sdk/sdk.gni
index bc0c851..03a0c7e 100644
--- a/ohos/sdk/sdk.gni
+++ b/ohos/sdk/sdk.gni
@@ -133,7 +133,7 @@ template("make_sdk_modules") {
_sdk_modules += [ "${_target_label}(${invoker.sdk_toolchain})" ]
}
sources = []
- set_sources_assignment_filter([])
+ # set_sources_assignment_filter([])
}
not_needed(invoker, [ "sdk_toolchain" ])
diff --git a/templates/cxx/prebuilt.gni b/templates/cxx/prebuilt.gni
index 74fe7fc..01f924b 100644
--- a/templates/cxx/prebuilt.gni
+++ b/templates/cxx/prebuilt.gni
@@ -42,7 +42,7 @@ template("ohos_prebuilt_executable") {
"license_file",
"license_as_sources",
])
- set_sources_assignment_filter([])
+ # set_sources_assignment_filter([])
sources = [ invoker.source ]
outputs = [ _copy_output ]
module_type = "bin"
@@ -90,7 +90,7 @@ template("ohos_prebuilt_shared_library") {
"license_file",
"license_as_sources",
])
- set_sources_assignment_filter([])
+ # set_sources_assignment_filter([])
sources = [ invoker.source ]
outputs = [ _copy_output ]
module_type = "lib"
@@ -136,7 +136,7 @@ template("ohos_prebuilt_static_library") {
"license_file",
"license_as_sources",
])
- set_sources_assignment_filter([])
+ # set_sources_assignment_filter([])
sources = [ invoker.source ]
outputs = [ _copy_output ]
bypass_module_info_generation = true
@@ -176,7 +176,7 @@ template("ohos_prebuilt_etc") {
"license_file",
"license_as_sources",
])
- set_sources_assignment_filter([])
+ # set_sources_assignment_filter([])
sources = [ invoker.source ]
outputs = [ _copy_output ]
module_type = "etc"
diff --git a/templates/metadata/module_info.gni b/templates/metadata/module_info.gni
index f4d4e54..412a1ea 100644
--- a/templates/metadata/module_info.gni
+++ b/templates/metadata/module_info.gni
@@ -223,8 +223,9 @@ template("write_meta_data") {
_parent_invoker = invoker.invoker
_caller_target_name = get_label_info(":${_parent_invoker.target_name}",
"label_no_toolchain")
- set_sources_assignment_filter(app_target_allowlist)
+ # set_sources_assignment_filter(app_target_allowlist)
sources = [ _caller_target_name ]
+ sources = filter_exclude(sources, app_target_allowlist)
if (sources != []) {
if (type == "js_assets" || type == "ets_assets" ||
type == "unresolved_assets" || type == "assets") {
@@ -237,7 +238,7 @@ template("write_meta_data") {
"Illegal target name: \"${_caller_target_name}\", target name of ohos_resources must endswith res or resources or resource")
}
}
- set_sources_assignment_filter([])
+ # set_sources_assignment_filter([])
}
script = "//build/templates/metadata/write_meta_data.py"
@@ -264,18 +265,19 @@ template("write_meta_data") {
_deps_metadata = []
inputs = []
- set_sources_assignment_filter(app_target_allowlist)
+ # set_sources_assignment_filter(app_target_allowlist)
foreach(d, _possible_deps) {
sources = []
_target_label = get_label_info(d, "label_no_toolchain")
sources += [ _target_label ]
+ sources = filter_exclude(sources, app_target_allowlist)
if (sources == []) {
_deps_metadata += [ get_label_info(d, "target_gen_dir") + "/" +
get_label_info(d, "name") + ".metadata" ]
deps += [ "${_target_label}__metadata" ]
}
}
- set_sources_assignment_filter([])
+ # set_sources_assignment_filter([])
if (_deps_metadata != []) {
args += [ "--deps-metadata" ]
--
2.45.2.windows.1

View File

@ -2,7 +2,7 @@
%global openHarmony_source_release OpenHarmony-v3.2-Release
Name: distributed-build
Version: 1.0.0
Release: 10
Release: 11
Summary: openEuler embedded softbus build tools
License: Apache-2.0
URL: https://gitee.com/openharmony/build
@ -17,16 +17,12 @@ Patch0006: 0006-feat-add-base-config.json-for-openeuler.patch
Patch0007: 0007-feat-add-gn-files-to-use-packages-on-openeuler.patch
Patch0008: 0008-feat-Adapt-to-openeuler.patch
Patch0009: 0009-feat-add-common-subsystem-and-delete-useless-config.patch
#Patch0010: 0010-feat-use-include-samgr-for-samgr-include-files-confi.patch
#Patch0011: 0011-feat-use-.z-for-libs-name.patch
Patch0012: 0012-fix-rpm-build-fail-caused-by-wrong-useless-code.patch
Patch0013: 0013-feature-use-llvm-tools-version-15-for-build.patch
Patch0014: 0014-feat-delete-the-default-sqlite-deps.patch
Patch0015: 0015-feat-and-hilog-gn-files.patch
Patch0016: 0016-fix-use-llvm15-path-on-x86_64.patch
Patch0017: 0017-feat-add-script-to-create-soft-link.patch
#Patch0018: 0018-feat-add-safwk-compile-gn-target.patch
#Patch0019: 0019-feat-add-devicemanager-gn-files.patch
Patch0020: 0020-feat-add-openssl-gn-file-and-soft-link.patch
Patch0021: 0021-feat-change-config-json.patch
Patch0022: 0022-add-build-gn-file-of-icu-jsoncpp-zlib.patch
@ -34,6 +30,7 @@ Patch0023: 0023-feat-for-embedded-comment-out-sysroot_hash.patch
Patch0024: 0024-feat-for-embedded-add-linux_arm64-toolchain.patch
Patch0025: 0025-feat-for-embedded-fix-sysroot-path.patch
Patch0026: 0026-feat-for-embedded-fix-jsoncpp-icu-zlib-sysroot.patch
Patch0027: 0027-feat-support-gn-upgrade.patch
BuildArch: noarch
%description
@ -53,6 +50,9 @@ cp -rp %{_builddir}/build-%{openHarmony_source_release}/* %{buildroot}/opt/dist
/opt/distributed-middleware-build
%changelog
* Mon Jul 29 2024 s_c_c <shichuchao@huawei.com> - 1.0.0-11
- Remove set_sources_assignment_filter and delete some redundant patchs
* Thu Jun 27 2024 s_c_c <shichuchao@huawei.com> - 1.0.0-10
- Fix jsoncpp icu and zlib sysroot path for embedded