mirror of
https://github.com/tile-ai/tilelang.git
synced 2026-10-24 07:04:00 +08:00
* Keep cross-compiler options isolated per build * Document cross-compiler option isolation --------- Co-authored-by: Zheng Yu <17133261+cla7aye15I4nd@users.noreply.github.com> Co-authored-by: SiriusNEO <chaofan@deepseek.com>
16 lines
490 B
Python
16 lines
490 B
Python
from tilelang.contrib import cc
|
|
|
|
|
|
def test_cross_compiler_does_not_persist_per_call_options():
|
|
calls = []
|
|
|
|
def compile_func(outputs, objects, options):
|
|
calls.append((outputs, objects, options))
|
|
|
|
fcompile = cc.cross_compiler(compile_func, options=["-base"])
|
|
fcompile("first.so", ["first.o"], options=["-first"])
|
|
fcompile("second.so", ["second.o"], options=["-second"])
|
|
|
|
assert calls[0][2] == ["-base", "-first"]
|
|
assert calls[1][2] == ["-base", "-second"]
|