| # Copyright 2024 The Chromium Authors |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| import("//build/buildflag_header.gni") |
| import("//components/optimization_guide/features.gni") |
| |
| buildflag_header("on_device_llm_buildflags") { |
| _on_device_llm_bundled = ios_on_device_llm_files != [] |
| |
| header = "on_device_llm_buildflags.h" |
| flags = [ "IOS_ON_DEVICE_LLM_BUNDLED=$_on_device_llm_bundled" ] |
| } |
| |
| if (ios_on_device_llm_files != []) { |
| bundle_data("on_device_llm_bundle_data") { |
| sources = ios_on_device_llm_files |
| outputs = |
| [ "{{bundle_resources_dir}}/on_device_model/{{source_file_part}}" ] |
| } |
| } else { |
| group("on_device_llm_bundle_data") { |
| } |
| } |