mirror of
https://github.com/kovidgoyal/kitty
synced 2026-06-08 14:18:26 +02:00
Cleanup any extra files produced by clang in debug mode when test compiling
This commit is contained in:
4
setup.py
4
setup.py
@@ -239,9 +239,9 @@ def test_compile(
|
||||
ldflags: Iterable[str] = (),
|
||||
) -> bool:
|
||||
src = src or 'int main(void) { return 0; }'
|
||||
with tempfile.NamedTemporaryFile(prefix='kitty-test-compile-') as f:
|
||||
with tempfile.TemporaryDirectory(prefix='kitty-test-compile-') as tdir:
|
||||
p = subprocess.Popen(
|
||||
[cc] + list(cflags) + ([] if link_also else ['-c']) + ['-x', lang, '-o', f.name, '-'] +
|
||||
[cc] + list(cflags) + ([] if link_also else ['-c']) + ['-x', lang, '-o', os.path.join(tdir, 'dummy'), '-'] +
|
||||
[f'-l{x}' for x in libraries] + list(ldflags),
|
||||
stdout=subprocess.DEVNULL, stdin=subprocess.PIPE, stderr=None if show_stderr else subprocess.DEVNULL
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user