Use CFLAGS and LDFLAGS env vars when building the launcher as well

Fixes #374
This commit is contained in:
Kovid Goyal 2018-03-11 08:12:17 +05:30
parent fc9980903d
commit 0b1f5209d5
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -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)