Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion wamr-compiler/build_llvm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,17 @@
# Copyright (C) 2020 Intel Corporation. All rights reserved.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

/usr/bin/env python3 -m pip install --user -r ../build-scripts/requirements.txt
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"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do you use /usr/bin/env?

source "$TEMP_DIR/bin/activate"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/usr/bin/env python3 -m pip install -r ../build-scripts/requirements.txt
/usr/bin/env python3 ../build-scripts/build_llvm.py "$@"
4 changes: 2 additions & 2 deletions wamr-compiler/build_llvm_arc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
# Copyright (C) 2020 Intel Corporation. All rights reserved.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

/usr/bin/env python3 -m pip install --user -r ../build-scripts/requirements.txt
/usr/bin/env python3 ../build-scripts/build_llvm.py --platform arc "$@"
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
$SCRIPT_DIR/build_llvm.sh --platform arc "$@"
4 changes: 2 additions & 2 deletions wamr-compiler/build_llvm_xtensa.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
# Copyright (C) 2020 Intel Corporation. All rights reserved.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

/usr/bin/env python3 -m pip install --user -r ../build-scripts/requirements.txt
/usr/bin/env python3 ../build-scripts/build_llvm.py --platform xtensa "$@"
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
$SCRIPT_DIR/build_llvm.sh --platform xtensa "$@"
Loading