1# Copyright (c) 2022 Huawei Device Co., Ltd. 2# Licensed under the Apache License, Version 2.0 (the "License"); 3# you may not use this file except in compliance with the License. 4# You may obtain a copy of the License at 5# 6# http://www.apache.org/licenses/LICENSE-2.0 7# 8# Unless required by applicable law or agreed to in writing, software 9# distributed under the License is distributed on an "AS IS" BASIS, 10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11# See the License for the specific language governing permissions and 12# limitations under the License. 13 14#This was originally a compilation entry, but now "default" is added to the component dependency of build/common/bundle.json. 15import("//build/ohos.gni") 16group("default") { 17 deps = [ 18 ":libstd.dylib.so", 19 ":libtest.dylib.so", 20 ] 21} 22 23ohos_prebuilt_shared_library("libstd.dylib.so") { 24 if (current_cpu == "arm64") { 25 source = "//prebuilts/rustc/linux-x86_64/current/lib/rustlib/aarch64-linux-ohos/lib/libstd.dylib.so" 26 } else if (current_cpu == "arm") { 27 source = "//prebuilts/rustc/linux-x86_64/current/lib/rustlib/armv7-linux-ohos/lib/libstd.dylib.so" 28 } else if (current_cpu == "x86_64" || current_cpu == "x64") { 29 source = 30 "//prebuilts/rustc/linux-x86_64/current/lib/libstd-b779f91b8eb0a330.so" 31 } 32 enable_strip = true 33 install_images = [ 34 "system", 35 "updater", 36 ] 37 output = "libstd.dylib.so" 38 part_name = "common" 39} 40 41ohos_prebuilt_shared_library("libtest.dylib.so") { 42 if (current_cpu == "arm64") { 43 source = "//prebuilts/rustc/linux-x86_64/current/lib/rustlib/aarch64-linux-ohos/lib/libtest.dylib.so" 44 } else if (current_cpu == "arm") { 45 source = "//prebuilts/rustc/linux-x86_64/current/lib/rustlib/armv7-linux-ohos/lib/libtest.dylib.so" 46 } else if (current_cpu == "x86_64" || current_cpu == "x64") { 47 source = 48 "//prebuilts/rustc/linux-x86_64/current/lib/libtest-167fcaac576ea811.so" 49 } else { 50 source = "" 51 } 52 install_images = [ 53 "system", 54 "updater", 55 ] 56 enable_strip = true 57 output = "libtest.dylib.so" 58 part_name = "common" 59} 60