mirror of
https://github.com/kovidgoyal/kitty.git
synced 2024-09-19 02:27:10 +03:00
Dont add CPPFLAGS from the python build
They contain include paths specific to the python build such as -I. that are not appropriate for building kitty. Also move cppflags in front of cflags when invoking the compiler.
This commit is contained in:
parent
796ead5d75
commit
e3795eb07e
10
setup.py
10
setup.py
@ -173,9 +173,7 @@ def init_env(
|
||||
('' if debug else 'N'),
|
||||
)
|
||||
)
|
||||
cppflags = shlex.split(cppflags) + shlex.split(
|
||||
sysconfig.get_config_var('CPPFLAGS')
|
||||
)
|
||||
cppflags = shlex.split(cppflags)
|
||||
cflags = os.environ.get(
|
||||
'OVERRIDE_CFLAGS', (
|
||||
'-Wextra -Wno-missing-field-initializers -Wall -std=c99'
|
||||
@ -359,13 +357,13 @@ def compile_c_extension(kenv, module, incremental, compilation_database, all_key
|
||||
|
||||
for original_src, dest in zip(sources, objects):
|
||||
src = original_src
|
||||
cppflgs = kenv.cppflags[:]
|
||||
cppflags = kenv.cppflags[:]
|
||||
is_special = src in SPECIAL_SOURCES
|
||||
if is_special:
|
||||
src, defines = SPECIAL_SOURCES[src]
|
||||
cppflgs.extend(map(define, defines))
|
||||
cppflags.extend(map(define, defines))
|
||||
|
||||
cmd = [kenv.cc, '-MMD'] + kenv.cflags + cppflgs
|
||||
cmd = [kenv.cc, '-MMD'] + cppflags + kenv.cflags
|
||||
key = original_src, os.path.basename(dest)
|
||||
all_keys.add(key)
|
||||
cmd_changed = compilation_database.get(key, [])[:-4] != cmd
|
||||
|
Loading…
Reference in New Issue
Block a user