mirror of
https://gitee.com/openharmony/arkui_ace_engine
synced 2025-02-03 08:43:28 +00:00
9f99e10437
Signed-off-by: Far <yesiyuan2@huawei.com> Change-Id: I228e7ad806bf9212140855072532d8b164e23906
62 lines
1.9 KiB
Plaintext
62 lines
1.9 KiB
Plaintext
# 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("//foundation/arkui/ace_engine/ace_config.gni")
|
|
|
|
template("gen_obj") {
|
|
name = target_name
|
|
action("gen_obj_" + name) {
|
|
visibility = [ ":*" ] # Only targets in this file can depend on this.
|
|
|
|
if (use_mingw_win) {
|
|
objcopy_tool = objcopy_mingw
|
|
script = "$ace_root/build/tools/build_resource_to_bytecode.py"
|
|
} else if (use_mac || target_os == "ios") {
|
|
objcopy_tool = objcopy_clang
|
|
script = "$ace_root/build/tools/build_resource_to_bytecode.py"
|
|
} else if (use_linux) {
|
|
objcopy_tool = objcopy_x86_64
|
|
script = "$ace_root/build/tools/build_resource_to_bytecode.py"
|
|
} else if (target_cpu == "x86_64") {
|
|
objcopy_tool = objcopy_x86_64
|
|
script = "$ace_root/build/tools/run_objcopy.py"
|
|
} else {
|
|
objcopy_tool = objcopy_default
|
|
script = "$ace_root/build/tools/run_objcopy.py"
|
|
}
|
|
|
|
args = [
|
|
"--objcopy",
|
|
rebase_path(objcopy_tool),
|
|
"--input",
|
|
rebase_path(invoker.input),
|
|
"--output",
|
|
rebase_path(invoker.output),
|
|
"--arch",
|
|
current_cpu,
|
|
]
|
|
|
|
deps = []
|
|
deps += invoker.snapshot_dep
|
|
|
|
inputs = [ invoker.input ]
|
|
outputs = [ invoker.output ]
|
|
}
|
|
|
|
source_set("gen_obj_src_" + name) {
|
|
sources = [ invoker.output ]
|
|
deps = [ ":gen_obj_" + name ]
|
|
}
|
|
}
|