From 0b1f5209d577801f4456ebde3352e8e45ba1469e Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 11 Mar 2018 08:12:17 +0530 Subject: [PATCH] Use CFLAGS and LDFLAGS env vars when building the launcher as well Fixes #374 --- setup.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 82b0ebced..77fe5e464 100755 --- a/setup.py +++ b/setup.py @@ -486,10 +486,12 @@ def build_linux_launcher(args, launcher_dir='.', for_bundle=False, sh_launcher=F cflags.append('-DFOR_LAUNCHER') pylib = get_python_flags(cflags) exe = 'kitty-profile' if args.profile else 'kitty' + cflags += shlex.split(os.environ.get('CFLAGS', '')) + ldflags = shlex.split(os.environ.get('LDFLAGS', '')) cmd = [env.cc] + cflags + [ 'linux-launcher.c', '-o', os.path.join(launcher_dir, exe) - ] + libs + pylib + ] + ldflags + libs + pylib run_tool(cmd)