From 7c260f47b987c1cc221121f9c84fbd93f9d9afe3 Mon Sep 17 00:00:00 2001 From: Sijie Yang Date: Thu, 10 Oct 2024 20:35:29 +0000 Subject: [PATCH] Update the building workflow --- .github/workflows/rust.yml | 7 +++++-- src/build.rs | 9 ++++----- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index d91b60fc..b2ef09ef 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -144,8 +144,11 @@ jobs: toolchain: stable target: 'aarch64-unknown-linux-ohos,armv7-unknown-linux-ohos,x86_64-unknown-linux-ohos' - - name: Run cargo build - run: cargo install ohrs && ohrs build -- --verbose --features ffi --release + - name: Install ohrs + run: cargo install ohrs + + - name: Run ohrs build + run: ohrs build -- --verbose --features ffi --release static_analysis: name: Static analysis diff --git a/src/build.rs b/src/build.rs index 3e7dc5b2..98f5ba68 100644 --- a/src/build.rs +++ b/src/build.rs @@ -115,11 +115,7 @@ fn new_boringssl_cmake_config() -> cmake::Config { for (name, value) in *params { boringssl_cmake.define(name, value); } - // common arguments for ohos help us to ignore some error - boringssl_cmake - .define("CMAKE_C_FLAGS", "-Wno-unused-command-line-argument"); - boringssl_cmake - .define("CMAKE_CXX_FLAGS", "-Wno-unused-command-line-argument"); + break; } } @@ -129,6 +125,9 @@ fn new_boringssl_cmake_config() -> cmake::Config { let toolchain_file = ohos_ndk_home.join("native/build/cmake/ohos.toolchain.cmake"); let toolchain_file = toolchain_file.to_str().unwrap(); boringssl_cmake.define("CMAKE_TOOLCHAIN_FILE", toolchain_file); + // common arguments for ohos help us to ignore some error + boringssl_cmake.define("CMAKE_C_FLAGS", "-Wno-unused-command-line-argument"); + boringssl_cmake.define("CMAKE_CXX_FLAGS", "-Wno-unused-command-line-argument"); } }