Remove dawn_build_litert_lm gn arg Remove the dawn_build_litert_lm gn arg since it isn't built by default anyways. Also add a helpful check to the build script to detect if LiteRT-LM source is missing to inform user that the gclient flag is needed. Bug: 521332988 Change-Id: I837daf46b4ef780ade6c1fa6e10547ec08d7ddbb Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/322055 Commit-Queue: Natalie Chouinard <chouinard@google.com> Reviewed-by: dan sinclair <dsinclair@chromium.org>
diff --git a/BUILD.gn b/BUILD.gn index 3d5b891..ced76d6 100644 --- a/BUILD.gn +++ b/BUILD.gn
@@ -103,11 +103,9 @@ deps = [ "tools/android" ] } - if (dawn_build_litert_lm) { - group("litert_lm") { - testonly = true - deps = [ "third_party/litert-lm:litert_lm_advanced_main" ] - } + group("litert_lm") { + testonly = true + deps = [ "third_party/litert-lm:litert_lm_advanced_main" ] } if (dawn_build_emdawnwebgpu) {
diff --git a/scripts/dawn_features.gni b/scripts/dawn_features.gni index 4390d48..05e4290 100644 --- a/scripts/dawn_features.gni +++ b/scripts/dawn_features.gni
@@ -33,9 +33,6 @@ # Sets defaults for other features so that we build as much as possible on the # current host OS. dawn_maximal = false - - # Build the LiteRT-LM benchmark binary using Bazel. - dawn_build_litert_lm = false } declare_args() {
diff --git a/third_party/litert-lm/build_litert_lm.py b/third_party/litert-lm/build_litert_lm.py index f963513..4cc3f39 100644 --- a/third_party/litert-lm/build_litert_lm.py +++ b/third_party/litert-lm/build_litert_lm.py
@@ -67,6 +67,16 @@ project_root = script_dir.parent.parent litert_lm_dir = script_dir / 'src' + if not litert_lm_dir.exists(): + print("Error: LiteRT-LM source directory not found.", file=sys.stderr) + print( + "Please add the following to your .gclient file under 'custom_vars':", + file=sys.stderr) + print(' "checkout_litert_lm": True,', file=sys.stderr) + print("And then run `gclient sync` to download the dependencies.", + file=sys.stderr) + sys.exit(1) + bazelisk_path = project_root / 'tools' / 'bazelisk' / 'bazelisk' prebuilt_cipd_dir = script_dir / 'data' / 'prebuilt' prebuilt_src_dir = litert_lm_dir / 'prebuilt'