From 641618d54fda9218588424e6b12e56741164edfc Mon Sep 17 00:00:00 2001
From: Yifan Zhao <yifanz16@illinois.edu>
Date: Sat, 3 Apr 2021 14:36:34 -0500
Subject: [PATCH] Reduced output from hpvm-clang

---
 hpvm/tools/hpvm-clang/main.py.in | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/hpvm/tools/hpvm-clang/main.py.in b/hpvm/tools/hpvm-clang/main.py.in
index e2bc5cbafa..b20af0b80f 100644
--- a/hpvm/tools/hpvm-clang/main.py.in
+++ b/hpvm/tools/hpvm-clang/main.py.in
@@ -36,6 +36,7 @@ def compile_hpvm_c(
     link_libs: List[str] = None,
     working_dir: PathLike = None,
     conf_file: PathLike = None,
+    verbose: bool = False,
 ):
     from subprocess import check_output
 
@@ -84,7 +85,8 @@ def compile_hpvm_c(
         link_binary(hpvm_rt_linked_file, output_file, link_dirs, link_libs)
     )
     for command in commands:
-        print(" ".join(command))
+        if verbose:
+            print(" ".join(command))
         check_output(command)
 
 
@@ -245,6 +247,10 @@ See option -b for that."""
         help="[clang linker] Link library (such as -lpthread)"
     )
 
+    parser.add_argument(
+        "-v", "--verbose", action="store_true", help="Print out all clang/opt/llvm-link commands used"
+    )
+
     args = parser.parse_args()
     if args.tensor_target == "tensor":
         if args.conf_file is None:
-- 
GitLab