mirror of
https://github.com/bytecodealliance/wasm-micro-runtime.git
synced 2025-09-05 17:32:26 +00:00

Installing pip packages system-wide is no longer recommended, therefore we create virtual environment for setting up the build environment for LLVM.
20 lines
474 B
Bash
Executable File
20 lines
474 B
Bash
Executable File
#!/bin/sh
|
|
|
|
# Copyright (C) 2020 Intel Corporation. All rights reserved.
|
|
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
|
|
TEMP_DIR=$(mktemp -d)
|
|
|
|
cleanup() {
|
|
local exit_code=$?
|
|
rm -rf "$TEMP_DIR"
|
|
exit $exit_code
|
|
}
|
|
|
|
trap cleanup EXIT INT TERM
|
|
|
|
/usr/bin/env python3 -m venv --clear "$TEMP_DIR"
|
|
source "$TEMP_DIR/bin/activate"
|
|
/usr/bin/env python3 -m pip install -r ../build-scripts/requirements.txt
|
|
/usr/bin/env python3 ../build-scripts/build_llvm.py "$@"
|