Skip to content

Commit 3340b15

Browse files
remove buck2 from cmake installation tutorial (#4214) (#4253)
Summary: Pull Request resolved: #4214 For alpha+, we need to remove all buck2 commands and buck2 dependencies from static doc and github readmes. This diff gets rid of the buck2 related commands and installations from cmake set up page Reviewed By: kirklandsign Differential Revision: D59643087 fbshipit-source-id: 39764a4a46f729d4414b86213b4d73242abbbd45 (cherry picked from commit d171297) Co-authored-by: Songhao Jia <[email protected]>
1 parent 7d2e667 commit 3340b15

File tree

1 file changed

+6
-22
lines changed

1 file changed

+6
-22
lines changed

docs/source/runtime-build-and-cross-compilation.md

Lines changed: 6 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,13 @@
11
# Building with CMake
22

3-
Although buck2 is the main build system for the ExecuTorch project, it's also
4-
possible to build core pieces of the runtime using [CMake](https://cmake.org/)
5-
for easier integration with other build systems. Even if you don't use CMake
6-
directly, CMake can emit scripts for other format like Make, Ninja or Xcode.
7-
For information, see [cmake-generators(7)](https://cmake.org/cmake/help/latest/manual/cmake-generators.7.html).
3+
ExecuTorch uses [CMake](https://cmake.org/) as its primary build system.
4+
Even if you don't use CMake directly, CMake can emit scripts for other format
5+
like Make, Ninja or Xcode. For information, see [cmake-generators(7)](https://cmake.org/cmake/help/latest/manual/cmake-generators.7.html).
86

97
## Targets Built by the CMake Build System
108

11-
ExecuTorch's CMake build system doesn't cover everything that the buck2 build
12-
system covers. It can only build pieces of the runtime that are likely to be
13-
useful to embedded systems users.
9+
ExecuTorch's CMake build system covers the pieces of the runtime that are
10+
likely to be useful to embedded systems users.
1411

1512
- `libexecutorch.a`: The core of the ExecuTorch runtime. Does not contain any
1613
operator/kernel definitions or backend definitions.
@@ -31,17 +28,8 @@ useful to embedded systems users.
3128

3229
Follow the steps below to have the tools ready before using CMake to build on your machine.
3330

34-
1. Clone the repo and install buck2 as described in the "Building a Runtime" section
35-
of [Setting Up ExecuTorch](getting-started-setup.md#building-a-runtime)
36-
- `buck2` is necessary because the CMake build system runs `buck2` commands
37-
to extract source lists from the primary build system. It will be possible
38-
to configure the CMake system to avoid calling `buck2`, though.
39-
2. If your system's version of python3 is older than 3.11:
31+
1. If your system's version of python3 is older than 3.11:
4032
- Run `pip install tomli`
41-
- This provides an import required by a script that the CMake build system
42-
calls to extract source lists from `buck2`. Consider doing this `pip
43-
install` inside your Python or Conda virtual environment if you created
44-
one already by following [Setting up ExecuTorch](getting-started-setup.md#setting-up-executorch).
4533
3. Install CMake version 3.19 or later:
4634
- Run `conda install cmake` or `pip install cmake`.
4735

@@ -57,9 +45,6 @@ cd executorch
5745

5846
# Clean and configure the CMake build system. It's good practice to do this
5947
# whenever cloning or pulling the upstream repo.
60-
#
61-
# NOTE: If your `buck2` binary is not on the PATH, you can change this line to
62-
# say something like `-DBUCK2=/tmp/buck2` to point directly to the tool.
6348
(rm -rf cmake-out && mkdir cmake-out && cd cmake-out && cmake ..)
6449
```
6550

@@ -140,7 +125,6 @@ Assuming Android NDK is available, run:
140125
rm -rf cmake-android-out && mkdir cmake-android-out && cd cmake-android-out
141126

142127
# point -DCMAKE_TOOLCHAIN_FILE to the location where ndk is installed
143-
# Run `which buck2`, if it returns empty (meaning the system doesn't know where buck2 is installed), pass in this flag `-DBUCK2=/path/to/buck2` pointing to buck2
144128
cmake -DCMAKE_TOOLCHAIN_FILE=/Users/{user_name}/Library/Android/sdk/ndk/25.2.9519653/build/cmake/android.toolchain.cmake -DANDROID_ABI=arm64-v8a ..
145129

146130
cd ..

0 commit comments

Comments
 (0)