| # Copyright 2021 The IREE Authors |
| # Licensed under the Apache License v2.0 with LLVM Exceptions. |
| # See https://llvm.org/LICENSE.txt for license information. |
| # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| if [ -z "$PYTHON" ]; then |
| version="$("$PYTHON" --version)" |
| echo "Using python: $PYTHON (version $version)" |
| repo_root="$(cd $(dirname $0)/.. && pwd)" |
| wheelhouse="$repo_root/wheels" |
| echo "---- BUILDING iree-compiler ----" |
| if [ -x "$(command -v ccache)" ]; then |
| export CMAKE_C_COMPILER_LAUNCHER=ccache |
| export CMAKE_CXX_COMPILER_LAUNCHER=ccache |
| if [ -x "$(command -v ninja)" ]; then |
| export CMAKE_GENERATOR=Ninja |
| $PYTHON -m pip wheel "${repo_root}" \ |
| --use-feature=in-tree-build \ |
| echo "---- INSTALLING iree-compiler ----" |
| $PYTHON -m pip install -f "$wheelhouse" --force-reinstall iree-compiler-dev |
| echo "---- QUICK SMOKE TEST ----" |
| $PYTHON $repo_root/build_tools/smoketest.py |