Commit 4bf1fd8c by Pratyush Patel Committed by Tianqi Chen

fix llvm dependency bug (#2198)

parent 71341451
......@@ -7,7 +7,6 @@ import os
from .._ffi.base import py_str
from .util import tempdir
from .._ffi.libinfo import find_include_path
def create_shared(output,
......@@ -50,7 +49,6 @@ def _linux_shared(output, objects, options, cc="g++"):
cmd += objects
if options:
cmd += options
cmd += ["-I" + path for path in find_include_path()]
proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
(out, _) = proc.communicate()
......
......@@ -6,6 +6,7 @@ from collections import namedtuple
from ._ffi.function import ModuleBase, _set_class_module
from ._ffi.function import _init_api
from ._ffi.libinfo import find_include_path
from .contrib import cc as _cc, tar as _tar, util as _util
ProfileResult = namedtuple("ProfileResult", ["mean", "results"])
......@@ -122,6 +123,8 @@ class Module(ModuleBase):
fcompile = _tar.tar
else:
fcompile = _cc.create_shared
if self.type_key == "c":
kwargs.update({'options': ["-I" + path for path in find_include_path()]})
fcompile(file_name, files, **kwargs)
def time_evaluator(self, func_name, ctx, number, repeat=1):
......
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