scripts: Clean up IREE_COMPILER_DIR

Move `IREE_COMPILER_DIR` out of the environment variable.

Change-Id: I092cf02cd36afa080d2f8ea4253d22bcf51be1df
diff --git a/check-iree-commit.sh b/check-iree-commit.sh
index 5119956..f466e11 100755
--- a/check-iree-commit.sh
+++ b/check-iree-commit.sh
@@ -17,13 +17,10 @@
 # Check IREE runtime commit version to be consistent with the compiler.
 
 IREE_SRC="$1"
+IREE_COMPILER_DIR="$2"
 
-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>"
+if [[ $# -ne 2 ]]; then
+  echo "Usage: check-iree-commit.sh <iree source dir> <iree compiler dir>"
   exit 1
 fi
 
diff --git a/download_iree_compiler.py b/download_iree_compiler.py
index 3be06a8..3cf814d 100755
--- a/download_iree_compiler.py
+++ b/download_iree_compiler.py
@@ -46,12 +46,6 @@
 
 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(
@@ -63,8 +57,15 @@
         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}"),