diff --git a/base/BUILD.gn b/base/BUILD.gn index 338aafbe5898b0c07cf3576c1c8f00377bcc8e3d..1e0ea91d0f967477a9d5751ae21e5c2cf6bb8aa1 100644 --- a/base/BUILD.gn +++ b/base/BUILD.gn @@ -150,9 +150,11 @@ ohos_shared_library("utils") { sources = sources_utils configs = [ ":utils_coverage_config" ] - if (c_utils_feature_intsan) { - sanitize = { - integer_overflow = true + if (!build_cross_platform_version) { + if (c_utils_feature_intsan) { + sanitize = { + integer_overflow = true + } } } @@ -186,7 +188,7 @@ ohos_shared_library("utils") { ########## modules for `c_utils` in rust ########## # rust compiler is not supportted on mac -if (host_os == "linux" && !is_asan) { +if (host_os == "linux" && !is_asan && !build_cross_platform_version) { import("//build/templates/rust/rust_cxx.gni") # used for templates rust_cxx() rust_cxx("cxx_rust_gen") { sources = [ @@ -247,7 +249,7 @@ if (host_os == "linux" && !is_asan) { group("utils_rust") { public_deps = [] - if (host_os == "linux" && !is_asan) { + if (host_os == "linux" && !is_asan && !build_cross_platform_version) { public_deps += [ ":utils_rs" ] } } diff --git a/base/test/BUILD.gn b/base/test/BUILD.gn index c44dea18ff9f1bed0e68e7d1d61565e0adcec368..2368aac2e1665a842280c073c50bcc29d574186b 100644 --- a/base/test/BUILD.gn +++ b/base/test/BUILD.gn @@ -20,7 +20,7 @@ group("unittest") { deps += [ "unittest/common:unittest" ] # rust compiler is not supportted on mac - if (host_os == "linux" && !is_asan) { + if (host_os == "linux" && !is_asan && !build_cross_platform_version) { deps += [ "unittest/rust:unittest" ] } } diff --git a/base/test/unittest/rust/BUILD.gn b/base/test/unittest/rust/BUILD.gn index e5a1266b08bebb8f9d2b254a2bbe64b78be5c204..8353fcd7dffeb093584c6d16445b93863930e51d 100644 --- a/base/test/unittest/rust/BUILD.gn +++ b/base/test/unittest/rust/BUILD.gn @@ -13,7 +13,7 @@ import("//build/ohos.gni") import("//build/test.gni") -if (host_os == "linux" && !is_asan) { +if (host_os == "linux" && !is_asan && !build_cross_platform_version) { config("module_private_config") { visibility = [ ":*" ]