xref: /aosp_15_r20/external/executorch/build/packaging/env_var_script_linux.sh (revision 523fa7a60841cd1ecfb9cc4201f1ca8b03ed023a)
1# Copyright (c) Meta Platforms, Inc. and affiliates.
2# All rights reserved.
3#
4# This source code is licensed under the BSD-style license found in the
5# LICENSE file in the root directory of this source tree.
6
7# This file is sourced into the environment before building a pip wheel. It
8# should typically only contain shell variable assignments. Be sure to export
9# any variables so that subprocesses will see them.
10
11# Enable pybindings so that users can execute ExecuTorch programs from python.
12export EXECUTORCH_BUILD_PYBIND=1
13
14# Ensure that CMAKE_ARGS is defined before referencing it. Defaults to empty
15# if not defined.
16export CMAKE_ARGS="${CMAKE_ARGS:-}"
17
18# Link the XNNPACK backend into the pybindings runtime so that users can execute
19# ExecuTorch programs that delegate to it.
20CMAKE_ARGS="${CMAKE_ARGS} -DEXECUTORCH_BUILD_XNNPACK=ON"
21