Commit d6b7b62d by Logan Weber Committed by Tianqi Chen

Revert compile_cmd kwarg name change (#3746)

* Revert compile_cmd kwarg name change

* Fix binutil tests
parent 2b975f4a
...@@ -27,7 +27,7 @@ from .util import tempdir ...@@ -27,7 +27,7 @@ from .util import tempdir
def create_shared(output, def create_shared(output,
objects, objects,
options=None, options=None,
compile_cmd="g++"): cc="g++"):
"""Create shared library. """Create shared library.
Parameters Parameters
...@@ -41,11 +41,11 @@ def create_shared(output, ...@@ -41,11 +41,11 @@ def create_shared(output,
options : List[str] options : List[str]
The list of additional options string. The list of additional options string.
compile_cmd : Optional[str] cc : Optional[str]
The compiler command. The compiler command.
""" """
if sys.platform == "darwin" or sys.platform.startswith("linux"): if sys.platform == "darwin" or sys.platform.startswith("linux"):
_linux_compile(output, objects, options, compile_cmd) _linux_compile(output, objects, options, cc)
elif sys.platform == "win32": elif sys.platform == "win32":
_windows_shared(output, objects, options) _windows_shared(output, objects, options)
else: else:
......
...@@ -43,7 +43,7 @@ def make_binary(): ...@@ -43,7 +43,7 @@ def make_binary():
with open(tmp_source, "w") as f: with open(tmp_source, "w") as f:
f.write(prog) f.write(prog)
cc.create_shared(tmp_obj, tmp_source, [], cc.create_shared(tmp_obj, tmp_source, [],
compile_cmd="{}gcc".format(TOOLCHAIN_PREFIX)) cc="{}gcc".format(TOOLCHAIN_PREFIX))
prog_bin = bytearray(open(tmp_obj, "rb").read()) prog_bin = bytearray(open(tmp_obj, "rb").read())
return prog_bin return prog_bin
......
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