@@ -375,6 +375,73 @@ function(executorch_append_filelist name outputvar)
375
375
)
376
376
endfunction ()
377
377
378
+ set (EXECUTORCH_BUILD_VARIABLES_FILELISTS
379
+ EXECUTORCH_SRCS
380
+ EXECUTORCH_CORE_SRCS
381
+ PORTABLE_KERNELS_SRCS
382
+ KERNELS_UTIL_ALL_DEPS_SRCS
383
+ OPTIMIZED_KERNELS_SRCS
384
+ QUANTIZED_KERNELS_SRCS
385
+ PROGRAM_SCHEMA_SRCS
386
+ OPTIMIZED_CPUBLAS_SRCS
387
+ OPTIMIZED_NATIVE_CPU_OPS_SRCS
388
+ TEST_BACKEND_COMPILER_LIB_SRCS
389
+ EXTENSION_DATA_LOADER_SRCS
390
+ EXTENSION_EVALUE_UTIL_SRCS
391
+ EXTENSION_FLAT_TENSOR_SRCS
392
+ EXTENSION_MODULE_SRCS
393
+ EXTENSION_RUNNER_UTIL_SRCS
394
+ EXTENSION_LLM_RUNNER_SRCS
395
+ EXTENSION_TENSOR_SRCS
396
+ EXTENSION_THREADPOOL_SRCS
397
+ EXTENSION_TRAINING_SRCS
398
+ TRAIN_XOR_SRCS
399
+ EXECUTOR_RUNNER_SRCS
400
+ SIZE_TEST_SRCS
401
+ MPS_EXECUTOR_RUNNER_SRCS
402
+ MPS_BACKEND_SRCS
403
+ MPS_SCHEMA_SRCS
404
+ XNN_EXECUTOR_RUNNER_SRCS
405
+ XNNPACK_BACKEND_SRCS
406
+ XNNPACK_SCHEMA_SRCS
407
+ VULKAN_SCHEMA_SRCS
408
+ CUSTOM_OPS_SRCS
409
+ LLAMA_RUNNER_SRCS
410
+ )
411
+ set (EXECUTORCH_BUILD_VARIABLES_VARNAMES
412
+ _executorch__srcs
413
+ _executorch_core__srcs
414
+ _portable_kernels__srcs
415
+ _kernels_util_all_deps__srcs
416
+ _optimized_kernels__srcs
417
+ _quantized_kernels__srcs
418
+ _program_schema__srcs
419
+ _optimized_cpublas__srcs
420
+ _optimized_native_cpu_ops__srcs
421
+ _test_backend_compiler_lib__srcs
422
+ _extension_data_loader__srcs
423
+ _extension_evalue_util__srcs
424
+ _extension_flat_tensor__srcs
425
+ _extension_module__srcs
426
+ _extension_runner_util__srcs
427
+ _extension_llm_runner__srcs
428
+ _extension_tensor__srcs
429
+ _extension_threadpool__srcs
430
+ _extension_training__srcs
431
+ _train_xor__srcs
432
+ _executor_runner__srcs
433
+ _size_test__srcs
434
+ _mps_executor_runner__srcs
435
+ _mps_backend__srcs
436
+ _mps_schema__srcs
437
+ _xnn_executor_runner__srcs
438
+ _xnnpack_backend__srcs
439
+ _xnnpack_schema__srcs
440
+ _vulkan_schema__srcs
441
+ _custom_ops__srcs
442
+ _llama_runner__srcs
443
+ )
444
+
378
445
# Fail the build if the src lists in build_variables.bzl do not match the src
379
446
# lists extracted from Buck and placed into EXECUTORCH_SRCS_FILE. This is
380
447
# intended to be a safety mechanism while we are in the process of removing Buck
@@ -386,74 +453,9 @@ endfunction()
386
453
# involve getting these lists to match!
387
454
function (executorch_validate_build_variables )
388
455
include (${EXECUTORCH_SRCS_FILE} )
389
- set (BUILD_VARIABLES_FILELISTS
390
- EXECUTORCH_SRCS
391
- EXECUTORCH_CORE_SRCS
392
- PORTABLE_KERNELS_SRCS
393
- KERNELS_UTIL_ALL_DEPS_SRCS
394
- OPTIMIZED_KERNELS_SRCS
395
- QUANTIZED_KERNELS_SRCS
396
- PROGRAM_SCHEMA_SRCS
397
- OPTIMIZED_CPUBLAS_SRCS
398
- OPTIMIZED_NATIVE_CPU_OPS_SRCS
399
- TEST_BACKEND_COMPILER_LIB_SRCS
400
- EXTENSION_DATA_LOADER_SRCS
401
- EXTENSION_EVALUE_UTIL_SRCS
402
- EXTENSION_FLAT_TENSOR_SRCS
403
- EXTENSION_MODULE_SRCS
404
- EXTENSION_RUNNER_UTIL_SRCS
405
- EXTENSION_LLM_RUNNER_SRCS
406
- EXTENSION_TENSOR_SRCS
407
- EXTENSION_THREADPOOL_SRCS
408
- EXTENSION_TRAINING_SRCS
409
- TRAIN_XOR_SRCS
410
- EXECUTOR_RUNNER_SRCS
411
- SIZE_TEST_SRCS
412
- MPS_EXECUTOR_RUNNER_SRCS
413
- MPS_BACKEND_SRCS
414
- MPS_SCHEMA_SRCS
415
- XNN_EXECUTOR_RUNNER_SRCS
416
- XNNPACK_BACKEND_SRCS
417
- XNNPACK_SCHEMA_SRCS
418
- VULKAN_SCHEMA_SRCS
419
- CUSTOM_OPS_SRCS
420
- LLAMA_RUNNER_SRCS
421
- )
422
- set (BUILD_VARIABLES_VARNAMES
423
- _executorch__srcs
424
- _executorch_core__srcs
425
- _portable_kernels__srcs
426
- _kernels_util_all_deps__srcs
427
- _optimized_kernels__srcs
428
- _quantized_kernels__srcs
429
- _program_schema__srcs
430
- _optimized_cpublas__srcs
431
- _optimized_native_cpu_ops__srcs
432
- _test_backend_compiler_lib__srcs
433
- _extension_data_loader__srcs
434
- _extension_evalue_util__srcs
435
- _extension_flat_tensor__srcs
436
- _extension_module__srcs
437
- _extension_runner_util__srcs
438
- _extension_llm_runner__srcs
439
- _extension_tensor__srcs
440
- _extension_threadpool__srcs
441
- _extension_training__srcs
442
- _train_xor__srcs
443
- _executor_runner__srcs
444
- _size_test__srcs
445
- _mps_executor_runner__srcs
446
- _mps_backend__srcs
447
- _mps_schema__srcs
448
- _xnn_executor_runner__srcs
449
- _xnnpack_backend__srcs
450
- _xnnpack_schema__srcs
451
- _vulkan_schema__srcs
452
- _custom_ops__srcs
453
- _llama_runner__srcs
454
- )
455
- foreach (filelist_and_varname IN ZIP_LISTS BUILD_VARIABLES_FILELISTS
456
- BUILD_VARIABLES_VARNAMES
456
+ foreach (filelist_and_varname IN
457
+ ZIP_LISTS EXECUTORCH_BUILD_VARIABLES_FILELISTS
458
+ EXECUTORCH_BUILD_VARIABLES_VARNAMES
457
459
)
458
460
executorch_append_filelist (
459
461
${filelist_and_varname_0}
@@ -504,3 +506,18 @@ function(executorch_validate_build_variables)
504
506
endif ()
505
507
endforeach ()
506
508
endfunction ()
509
+
510
+ function (executorch_load_build_variables )
511
+ foreach (filelist_and_varname IN
512
+ ZIP_LISTS EXECUTORCH_BUILD_VARIABLES_FILELISTS
513
+ EXECUTORCH_BUILD_VARIABLES_VARNAMES
514
+ )
515
+ executorch_append_filelist (
516
+ ${filelist_and_varname_0} "${filelist_and_varname_1} "
517
+ )
518
+ set (${filelist_and_varname_1}
519
+ "${${filelist_and_varname_1} }"
520
+ PARENT_SCOPE
521
+ )
522
+ endforeach ()
523
+ endfunction ()
0 commit comments