# Copyright (c) 2023 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. import("//build/ohos.gni") import("//build/ohos/ace/ace_args.gni") import("//foundation/graphic/graphic_2d/graphic_config.gni") defines = [ "OHOS_PLATFORM", "OHOS_STANDARD_SYSTEM", ] declare_args() { ace_engine_feature_enable_accessibility = false ace_engine_feature_enable_web = false } js_engines = [] ark_engine = { engine_name = "ark" engine_path = "jsi" engine_defines = [ "USE_ARK_ENGINE" ] } js_engines += [ ark_engine ] if (ace_enable_gpu) { disable_gpu = false } else { disable_gpu = true } if (ace_engine_feature_enable_accessibility) { accessibility_support = true } if (ace_engine_feature_enable_web) { web_components_support = true } use_build_in_js_engine = true use_external_icu = "shared" ohos_standard_fontmgr = true sk_use_hilog = true rich_components_support = true advance_components_support = false remote_window_support = true effect_component_support = true xcomponent_components_support = true pixel_map_support = true js_pa_support = true connect_server_support = true hdc_register_support = true pa_engine_path = "adapter/ohos/entrance/pa_engine" enable_rosen_backend = true if (defined(global_parts_info.distributeddatamgr_udmf) && defined(global_parts_info.msdp_device_status)) { enable_drag_framework = true } else { enable_drag_framework = false } if (defined(global_parts_info.inputmethod_imf)) { enable_standard_input = true } else { enable_standard_input = false } build_container_scope_lib = true multiple_window_support = true enable_ability_component = true video_components_support = true video_support_jsstack = true image_components_support = true preview_support = false if (defined(global_parts_info.distributeddatamgr_pasteboard)) { enable_system_clipboard = true } else { enable_system_clipboard = false } enable_image_compression = true if (defined(global_parts_info.graphic_graphic_3d)) { model_component_support = true } else { model_component_support = false } window_scene_support = true dynamic_component_support = true vsync_timeout_check = true use_fast_taskpool = false state_mgmt_use_aot = true if (defined(preview_support) && preview_support) { defines += [ "PREVIEW" ] } if (defined(image_components_support) && image_components_support) { defines += [ "IMAGE_SUPPORTED" ] } if (defined(video_components_support) && video_components_support) { defines += [ "VIDEO_SUPPORTED" ] } if (defined(video_support_jsstack) && video_support_jsstack) { defines += [ "SUPPORT_JSSTACK" ] } if (defined(is_experiment_build) && is_experiment_build) { web_components_support = true accessibility_support = true } if (defined(web_components_support) && web_components_support) { defines += [ "WEB_SUPPORTED" ] } if (defined(enable_ability_component) && enable_ability_component) { defines += [ "ABILITY_COMPONENT_SUPPORTED" ] } if (disable_gpu || enable_rosen_backend) { defines += [ "GPU_DISABLED" ] } if (disable_gpu) { defines += [ "UPLOAD_GPU_DISABLED" ] } if (remote_window_support) { defines += [ "REMOTE_WINDOW_SUPPORTED" ] } if (effect_component_support) { defines += [ "EFFECT_COMPONENT_SUPPORTED" ] } if (xcomponent_components_support) { defines += [ "XCOMPONENT_SUPPORTED" ] } if (pixel_map_support) { defines += [ "PIXEL_MAP_SUPPORTED" ] } if (enable_rosen_backend) { defines += [ "ENABLE_ROSEN_BACKEND" ] } if (enable_standard_input) { defines += [ "ENABLE_STANDARD_INPUT" ] } if (multiple_window_support) { defines += [ "MULTIPLE_WINDOW_SUPPORTED" ] } if (model_component_support) { defines += [ "MODEL_COMPONENT_SUPPORTED" ] } if (use_build_in_js_engine) { defines += [ "HIDDEN_SYMBOL" ] } if (window_scene_support) { defines += [ "WINDOW_SCENE_SUPPORTED" ] } if (enable_drag_framework) { defines += [ "ENABLE_DRAG_FRAMEWORK" ] } if (defined(global_parts_info.multimedia_media_library)) { media_library_exists = true defines += [ "MEDIA_LIBRARY_EXISTS" ] } else { media_library_exists = false } if (defined(global_parts_info.hiviewdfx_hichecker)) { hichecker_exists = true defines += [ "HICHECKER_EXISTS" ] } else { hichecker_exists = false } if (dynamic_component_support) { defines += [ "DYNAMIC_COMPONENT_SUPPORT" ] } if (vsync_timeout_check) { defines += [ "VSYNC_TIMEOUT_CHECK" ] } if (use_fast_taskpool) { defines += [ "USE_FAST_TASKPOOL" ] } if (defined(state_mgmt_use_aot) && state_mgmt_use_aot) { defines += [ "STATE_MGMT_USE_AOT" ] } cflags_cc = [ "-Wno-thread-safety-attributes", "-Wno-thread-safety-analysis", ]