"docs/vscode:/vscode.git/clone" did not exist on "b8d029b11d112671d80b944c149f27f003c2a54f"
Commit 304b4465 authored by penguin_wwy's avatar penguin_wwy Committed by LeiWang1999
Browse files

[Dev] Correcting cxx compiler (#294)

parent 5079e2a5
......@@ -15,6 +15,7 @@
# specific language governing permissions and limitations
# under the License.
"""Util to invoke C/C++ compilers in the system."""
import functools
import os
import shutil
import subprocess
......@@ -62,6 +63,7 @@ def get_cc():
return None
@functools.lru_cache(maxsize=None)
def get_cplus_compiler():
"""Return the path to the default C/C++ compiler.
......
......@@ -67,10 +67,11 @@ class LibraryGenerator(object):
src.name,
]
elif is_cpu_target(target):
from tilelang.contrib.cc import get_cplus_compiler
src = tempfile.NamedTemporaryFile(mode="w", suffix=".cpp", delete=False)
libpath = src.name.replace(".cpp", ".so")
command = ["g++", "-std=c++17", "-fPIC", "-shared", src.name]
command = [get_cplus_compiler(), "-std=c++17", "-fPIC", "-shared", src.name]
with_tl = False
command += [
"-I" + TILELANG_TEMPLATE_PATH,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment