build_llvm.sh 469 B

12345678910111213141516171819
  1. #!/bin/sh
  2. # Copyright (C) 2020 Intel Corporation. All rights reserved.
  3. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  4. TEMP_DIR=$(mktemp -d)
  5. cleanup() {
  6. local exit_code=$?
  7. rm -rf "$TEMP_DIR"
  8. exit $exit_code
  9. }
  10. trap cleanup EXIT INT TERM
  11. /usr/bin/env python3 -m venv --clear "$TEMP_DIR"
  12. . "$TEMP_DIR/bin/activate"
  13. /usr/bin/env python3 -m pip install -r ../build-scripts/requirements.txt
  14. /usr/bin/env python3 ../build-scripts/build_llvm.py "$@"