适配Linux arm host openharmony编译

Signed-off-by: wylyw78 <wenyu17@hauwei.com>
This commit is contained in:
wylyw78 2024-06-13 16:27:19 +08:00
parent 2b0d38be07
commit a68d9c93d7
3 changed files with 10 additions and 4 deletions

View File

@ -110,7 +110,11 @@ if ("${current_os}_${current_cpu}" == "mac_arm64") {
objcopy_clang = "$clang_base_path/bin/llvm-objcopy"
if (is_ohos_standard_system) {
objcopy_default = "//prebuilts/clang/ohos/linux-x86_64/llvm/bin/llvm-objcopy"
if (host_cpu == "arm64") {
objcopy_default = "//prebuilts/clang/ohos/linux-aarch64/llvm/bin/llvm-objcopy"
} else {
objcopy_default = "//prebuilts/clang/ohos/linux-x86_64/llvm/bin/llvm-objcopy"
}
} else if (is_arkui_x) {
if (host_os == "mac") {
objcopy_default = objcopy_clang

View File

@ -9,7 +9,7 @@
# 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.
# limitations under the License.
import("//build/ohos.gni")
import("//foundation/arkui/ace_engine/ace_config.gni")
@ -130,7 +130,9 @@ if (is_ohos_standard_system) {
ohos_copy("copy_preview_shared_library") {
deps = []
foreach(module, napi_modules) {
deps += [ ":copy_napi_${module.prefix}libs" ]
if (!(is_linux && host_cpu == "arm64")) {
+ deps += [ ":copy_napi_${module.prefix}libs" ]
+ }
}
# The dynamic library here is used for local testing of the previewer.

View File

@ -27,7 +27,7 @@ if (use_mac) {
"//base/global/resource_management/frameworks/resmgr:global_resmgr_win"
label_hilog =
"//base/hiviewdfx/hilog/interfaces/native/innerkits:libhilog_windows"
} else if (use_linux) {
} else {
dylib_suffix = ".so"
label_res =
"//base/global/resource_management/frameworks/resmgr:global_resmgr_linux"