diff --git a/BUILD.gn b/BUILD.gn index 030d401f7e68b78295e0fd30e3501d1abfefc583..3b03c3791046de8e2318c198c969cf877be217e9 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -12,6 +12,7 @@ # limitations under the License. import("//build/ohos.gni") +import("//third_party/sqlite/sqlite.gni") is_cross_platform_build = defined(is_arkui_x) && is_arkui_x sqlite_patched_dir = root_out_dir + "/patched_sqlite" @@ -121,8 +122,10 @@ ohos_shared_library("sqlite") { "SQLITE_HDR_CHECK", "SQLITE_ENABLE_ICU", "SQLITE_META_DWR", - "SQLITE_CHECK_PAGES", ] + if (sqlite_support_check_pages) { + defines += [ "SQLITE_CHECK_PAGES" ] + } cflags_c = [ "-fvisibility=hidden", "-Wno-implicit-fallthrough", diff --git a/bundle.json b/bundle.json index 2d7932d8f0dd4951ad890f3e3b750a2e0960af36..b733d959f77b1571557362debe2efd21b3b2745b 100644 --- a/bundle.json +++ b/bundle.json @@ -14,7 +14,7 @@ "name": "sqlite", "subsystem": "thirdparty", "syscap": [], - "features": [], + "features": [ "sqlite_support_check_pages" ], "adapted_system_type": [ "standard" ], "rom": "2200KB", "ram": "1024KB", diff --git a/sqlite.gni b/sqlite.gni new file mode 100644 index 0000000000000000000000000000000000000000..0f9c7918f6137ed70f020fea71df20fedf0932ea --- /dev/null +++ b/sqlite.gni @@ -0,0 +1,16 @@ +# Copyright (C) 2025 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# 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. + +declare_args() { + sqlite_support_check_pages = false +}