mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-23 08:47:47 +02:00
Fix launcher build with sanitize
This commit is contained in:
6
setup.py
6
setup.py
@@ -826,10 +826,13 @@ def build_launcher(args: Options, launcher_dir: str = '.', bundle_type: str = 's
|
|||||||
cflags += '-arch x86_64 -arch arm64'.split()
|
cflags += '-arch x86_64 -arch arm64'.split()
|
||||||
cppflags = []
|
cppflags = []
|
||||||
libs: List[str] = []
|
libs: List[str] = []
|
||||||
|
ldflags = shlex.split(os.environ.get('LDFLAGS', ''))
|
||||||
if args.profile or args.sanitize:
|
if args.profile or args.sanitize:
|
||||||
if args.sanitize:
|
if args.sanitize:
|
||||||
cflags.append('-g3')
|
cflags.append('-g3')
|
||||||
cflags.extend(get_sanitize_args(env.cc, env.ccver))
|
sanitize_args = get_sanitize_args(env.cc, env.ccver)
|
||||||
|
cflags.extend(sanitize_args)
|
||||||
|
ldflags.extend(sanitize_args)
|
||||||
libs += ['-lasan'] if is_gcc(env.cc) and not is_macos else []
|
libs += ['-lasan'] if is_gcc(env.cc) and not is_macos else []
|
||||||
else:
|
else:
|
||||||
cflags.append('-g')
|
cflags.append('-g')
|
||||||
@@ -855,7 +858,6 @@ def build_launcher(args: Options, launcher_dir: str = '.', bundle_type: str = 's
|
|||||||
pylib = get_python_flags(cflags, for_main_executable=True)
|
pylib = get_python_flags(cflags, for_main_executable=True)
|
||||||
cppflags += shlex.split(os.environ.get('CPPFLAGS', ''))
|
cppflags += shlex.split(os.environ.get('CPPFLAGS', ''))
|
||||||
cflags += shlex.split(os.environ.get('CFLAGS', ''))
|
cflags += shlex.split(os.environ.get('CFLAGS', ''))
|
||||||
ldflags = shlex.split(os.environ.get('LDFLAGS', ''))
|
|
||||||
for path in args.extra_include_dirs:
|
for path in args.extra_include_dirs:
|
||||||
cflags.append(f'-I{path}')
|
cflags.append(f'-I{path}')
|
||||||
if bundle_type == 'linux-freeze':
|
if bundle_type == 'linux-freeze':
|
||||||
|
|||||||
Reference in New Issue
Block a user