Skip to content

Commit 9168302

Browse files
authored
Delete extract_sources.py and cmake_deps.toml (#13395)
These are no longer used as we don't require Buck in our top-level CMake build anymore.
1 parent 6e520e2 commit 9168302

File tree

5 files changed

+0
-867
lines changed

5 files changed

+0
-867
lines changed

pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ requires = [
44
"pip>=23", # For building the pip package.
55
"pyyaml", # Imported by the kernel codegen tools.
66
"setuptools>=63", # For building the pip package contents.
7-
"tomli", # Imported by extract_sources.py when using python < 3.11.
87
"wheel", # For building the pip package archive.
98
"zstd", # Imported by resolve_buck.py.
109
"certifi", # Imported by resolve_buck.py.

requirements-dev.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ cmake>=3.29, <4.0.0 # For building binary targets in the wheel.
44
pip>=23 # For building the pip package.
55
pyyaml # Imported by the kernel codegen tools.
66
setuptools>=63 # For building the pip package contents.
7-
tomli # Imported by extract_sources.py when using python < 3.11.
87
wheel # For building the pip package archive.
98
zstd # Imported by resolve_buck.py.
109
certifi # Imported by resolve_buck.py.

tools/cmake/Utils.cmake

Lines changed: 0 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -67,58 +67,6 @@ function(target_link_options_gc_sections target_name)
6767
endif()
6868
endfunction()
6969

70-
# Extract source files based on toml config. This is useful to keep buck2 and
71-
# cmake aligned. Do not regenerate if file exists.
72-
function(extract_sources sources_file)
73-
if(EXISTS "${sources_file}")
74-
message(STATUS "executorch: Using source file list ${sources_file}")
75-
else()
76-
# A file wasn't generated. Run a script to extract the source lists from the
77-
# buck2 build system and write them to a file we can include.
78-
#
79-
# NOTE: This will only happen once during cmake setup, so it will not re-run
80-
# if the buck2 targets change.
81-
message(STATUS "executorch: Generating source file list ${sources_file}")
82-
if(EXECUTORCH_ROOT)
83-
set(executorch_root ${EXECUTORCH_ROOT})
84-
else()
85-
set(executorch_root ${CMAKE_CURRENT_SOURCE_DIR})
86-
endif()
87-
88-
if(ANDROID_ABI)
89-
if("${ANDROID_ABI}" STREQUAL "arm64-v8a")
90-
set(target_platforms_arg "--target-platforms=shim_et//:android-arm64")
91-
elseif("${ANDROID_ABI}" STREQUAL "x86_64")
92-
set(target_platforms_arg "--target-platforms=shim_et//:android-x86_64")
93-
else()
94-
message(
95-
FATAL_ERROR
96-
"Unsupported ANDROID_ABI setting ${ANDROID_ABI}. Please add it here!"
97-
)
98-
endif()
99-
endif()
100-
execute_process(
101-
COMMAND
102-
${PYTHON_EXECUTABLE} ${executorch_root}/tools/cmake/extract_sources.py
103-
--config=${executorch_root}/tools/cmake/cmake_deps.toml
104-
--out=${sources_file} --buck2=${BUCK2} ${target_platforms_arg}
105-
OUTPUT_VARIABLE gen_srcs_output
106-
ERROR_VARIABLE gen_srcs_error
107-
RESULT_VARIABLE gen_srcs_exit_code
108-
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
109-
)
110-
111-
if(NOT gen_srcs_exit_code EQUAL 0)
112-
message("Error while generating ${sources_file}. "
113-
"Exit code: ${gen_srcs_exit_code}"
114-
)
115-
message("Output:\n${gen_srcs_output}")
116-
message("Error:\n${gen_srcs_error}")
117-
message(FATAL_ERROR "executorch: source list generation failed")
118-
endif()
119-
endif()
120-
endfunction()
121-
12270
# Sets the value of the PYTHON_EXECUTABLE variable to 'python' if in an active
12371
# (non-base) conda environment, and 'python3' otherwise. This maintains
12472
# backwards compatibility for non-conda users and avoids conda users needing to

0 commit comments

Comments
 (0)