Move temporary location for shared objects into build directory

This commit is contained in:
Luflosi 2019-07-01 13:26:03 +02:00
parent 6a31909557
commit 4be6e9009a
No known key found for this signature in database
GPG Key ID: 14140F703B7D8362

View File

@ -467,8 +467,9 @@ def compile_c_extension(kenv, module, incremental, compilation_database, sources
todo[original_src] = cmd
if todo:
parallel_run(todo)
dest = os.path.join(base, module + '.temp.so')
real_dest = dest[:-len('.temp.so')] + '.so'
dest = os.path.join(build_dir, module + '.so')
real_dest = os.path.join(base, module + '.so')
os.makedirs(os.path.dirname(dest), exist_ok=True)
if not incremental or newer(real_dest, *objects):
# Old versions of clang don't like -pthread being passed to the linker
# Don't treat linker warnings as errors (linker generates spurious