junrushao1994 commented on a change in pull request #6600:
URL: https://github.com/apache/incubator-tvm/pull/6600#discussion_r497824388
##########
File path: python/tvm/rpc/server.py
##########
@@ -73,14 +73,17 @@ def load_module(file_name):
@tvm._ffi.register_func("tvm.rpc.server.download_linked_module",
override=True)
def download_linked_module(file_name):
"""Load module from remote side."""
+ # c++ compiler/linker
+ cc = os.environ['CXX'] if 'CXX' in os.environ.keys() else "g++"
Review comment:
```suggestion
cc = os.environ.get("CXX", "g++")
```
##########
File path: python/tvm/runtime/module.py
##########
@@ -393,13 +394,17 @@ def load_module(path, fmt=""):
This function will automatically call
cc.create_shared if the path is in format .o or .tar
"""
+
+ # c++ compiler/linker
+ cc = os.environ["CXX"] if "CXX" in os.environ.keys() else "g++"
Review comment:
```suggestion
cc = os.environ.get("CXX", "g++")
```
##########
File path: python/tvm/contrib/cc.py
##########
@@ -103,7 +105,8 @@ def get_target_triple():
# assign so as default output format
create_shared.output_format = "so" if sys.platform != "win32" else "dll"
create_shared.get_target_triple = get_target_by_dump_machine(
- "g++" if sys.platform == "darwin" or sys.platform.startswith("linux") else
None
+ os.environ["CXX"] if "CXX" in os.environ.keys() else \
+ "g++" if sys.platform == "darwin" or sys.platform.startswith("linux")
else None
Review comment:
```suggestion
os.environ.get("CXX", "g++") if sys.platform == "darwin" or
sys.platform.startswith("linux") else None
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]