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 current_os == "ohos") { 30 source = "//prebuilts/rustc/linux-x86_64/current/lib/rustlib/x86_64-unknown-linux-ohos/lib/libstd.dylib.so" 31 } else if (current_cpu == "x86_64" || current_cpu == "x64") { 32 source = 33 "//prebuilts/rustc/linux-x86_64/current/lib/libstd-b779f91b8eb0a330.so" 34 } 35 enable_strip = true 36 install_images = [ 37 "system", 38 "updater", 39 ] 40 output = "libstd.dylib.so" 41 subsystem_name = "build" 42 part_name = "build_framework" 43} 44 45ohos_prebuilt_shared_library("libtest.dylib.so") { 46 if (current_cpu == "arm64") { 47 source = "//prebuilts/rustc/linux-x86_64/current/lib/rustlib/aarch64-linux-ohos/lib/libtest.dylib.so" 48 } else if (current_cpu == "arm") { 49 source = "//prebuilts/rustc/linux-x86_64/current/lib/rustlib/armv7-linux-ohos/lib/libtest.dylib.so" 50 } else if ((current_cpu == "x86_64" || current_cpu == "x64") && 51 current_os == "ohos") { 52 source = "//prebuilts/rustc/linux-x86_64/current/lib/rustlib/x86_64-unknown-linux-ohos/lib/libtest.dylib.so" 53 } else if (current_cpu == "x86_64" || current_cpu == "x64") { 54 source = 55 "//prebuilts/rustc/linux-x86_64/current/lib/libtest-167fcaac576ea811.so" 56 } else { 57 source = "" 58 } 59 install_images = [ 60 "system", 61 "updater", 62 ] 63 enable_strip = true 64 output = "libtest.dylib.so" 65 subsystem_name = "build" 66 part_name = "build_framework" 67} 68