Merge "Revert "scripts: Clean up IREE_COMPILER_DIR""
diff --git a/check-iree-commit.sh b/check-iree-commit.sh
index f466e11..5119956 100755
--- a/check-iree-commit.sh
+++ b/check-iree-commit.sh
@@ -17,10 +17,13 @@
# Check IREE runtime commit version to be consistent with the compiler.
IREE_SRC="$1"
-IREE_COMPILER_DIR="$2"
-if [[ $# -ne 2 ]]; then
- echo "Usage: check-iree-commit.sh <iree source dir> <iree compiler dir>"
+if [[ -z "${IREE_COMPILER_DIR}" ]]; then
+ echo "Source build/setup.sh first"
+ exit 1
+fi
+if [[ -z "${IREE_SRC}" ]]; then
+ echo "Usage: check-iree-commit.sh <iree source dir>"
exit 1
fi
diff --git a/download_iree_compiler.py b/download_iree_compiler.py
index 3cf814d..3be06a8 100755
--- a/download_iree_compiler.py
+++ b/download_iree_compiler.py
@@ -46,6 +46,12 @@
def main():
""" Download IREE host compiler from the snapshot release."""
+ iree_compiler_dir = os.getenv("IREE_COMPILER_DIR")
+ if not iree_compiler_dir:
+ print("Please run 'source build/setup.sh' first")
+ sys.exit(1)
+ iree_compiler_dir = Path(iree_compiler_dir)
+
parser = argparse.ArgumentParser(
description="Download IREE host compiler from snapshot releases")
parser.add_argument(
@@ -57,15 +63,8 @@
help=("URL to check the IREE release."
"(default: https://api.github.com/repos/google/iree/releases)")
)
- parser.add_argument(
- "--iree_compiler_dir", action="store", required=True,
- default="",
- help=("IREE compiler installed directory")
- )
args = parser.parse_args()
- iree_compiler_dir = Path(args.iree_compiler_dir)
-
snapshot = None
if args.tag_name:
r = requests.get((f"{args.release_url}/tags/{args.tag_name}"),