Pass CFLAGS to linker as well

Fixes #435
This commit is contained in:
Kovid Goyal 2018-04-03 10:03:03 +05:30
parent 83e225a50f
commit 8b4c7ea23f
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -370,7 +370,7 @@ def compile_c_extension(kenv, module, incremental, compilation_database, all_key
parallel_run(todo)
dest = os.path.join(base, module + '.so')
if not incremental or newer(dest, *objects):
run_tool([kenv.cc] + kenv.ldflags + objects + kenv.ldpaths + ['-o', dest], desc='Linking {} ...'.format(emphasis(module)))
run_tool([kenv.cc] + kenv.cflags + kenv.ldflags + objects + kenv.ldpaths + ['-o', dest], desc='Linking {} ...'.format(emphasis(module)))
def find_c_files():