Line
Link Here
|
0 |
-- kitty-0.15.0/setup.py |
0 |
++ kitty-0.15.0/setup.py |
Lines 204-210
Link Here
|
204 |
if ccver >= (5, 0): |
204 |
if ccver >= (5, 0): |
205 |
df += ' -Og' |
205 |
df += ' -Og' |
206 |
float_conversion = '-Wfloat-conversion' |
206 |
float_conversion = '-Wfloat-conversion' |
207 |
optimize = df if debug or sanitize else '-O3' |
207 |
optimize = '' |
208 |
sanitize_args = get_sanitize_args(cc, ccver) if sanitize else set() |
208 |
sanitize_args = get_sanitize_args(cc, ccver) if sanitize else set() |
209 |
cppflags = os.environ.get( |
209 |
cppflags = os.environ.get( |
210 |
'OVERRIDE_CPPFLAGS', '-D{}DEBUG'.format('' if debug else 'N'), |
210 |
'OVERRIDE_CPPFLAGS', '-D{}DEBUG'.format('' if debug else 'N'), |
Lines 217-223
Link Here
|
217 |
cflags = os.environ.get( |
217 |
cflags = os.environ.get( |
218 |
'OVERRIDE_CFLAGS', ( |
218 |
'OVERRIDE_CFLAGS', ( |
219 |
'-Wextra {} -Wno-missing-field-initializers -Wall -Wstrict-prototypes -std=c11' |
219 |
'-Wextra {} -Wno-missing-field-initializers -Wall -Wstrict-prototypes -std=c11' |
220 |
' -pedantic-errors -Werror {} {} -fwrapv {} {} -pipe {} -fvisibility=hidden' |
220 |
' -pedantic-errors {} {} -fwrapv {} {} {} -fvisibility=hidden' |
221 |
).format( |
221 |
).format( |
222 |
float_conversion, std, |
222 |
float_conversion, std, |
223 |
optimize, |
223 |
optimize, |
Lines 232-238
Link Here
|
232 |
) |
232 |
) |
233 |
ldflags = os.environ.get( |
233 |
ldflags = os.environ.get( |
234 |
'OVERRIDE_LDFLAGS', |
234 |
'OVERRIDE_LDFLAGS', |
235 |
'-Wall ' + ' '.join(sanitize_args) + ('' if debug else ' -O3') |
235 |
'-Wall ' + ' '.join(sanitize_args) |
236 |
) |
236 |
) |
237 |
ldflags = shlex.split(ldflags) |
237 |
ldflags = shlex.split(ldflags) |
238 |
ldflags.append('-shared') |
238 |
ldflags.append('-shared') |
Lines 611-617
Link Here
|
611 |
def build_launcher(args, launcher_dir='.', bundle_type='source'): |
611 |
def build_launcher(args, launcher_dir='.', bundle_type='source'): |
612 |
cflags = '-Wall -Werror -fpie'.split() |
612 |
cflags = '-Wall -fpie'.split() |
613 |
cppflags = [] |
613 |
cppflags = [] |
614 |
libs = [] |
614 |
libs = [] |
615 |
if args.profile or args.sanitize: |
615 |
if args.profile or args.sanitize: |
Lines 623-630
Link Here
|
623 |
cflags.append('-g') |
623 |
cflags.append('-g') |
624 |
if args.profile: |
624 |
if args.profile: |
625 |
libs.append('-lprofiler') |
625 |
libs.append('-lprofiler') |
626 |
else: |
|
|
627 |
cflags.append('-O3') |
628 |
if bundle_type.endswith('-freeze'): |
626 |
if bundle_type.endswith('-freeze'): |
629 |
cppflags.append('-DFOR_BUNDLE') |
627 |
cppflags.append('-DFOR_BUNDLE') |
630 |
cppflags.append('-DPYVER="{}"'.format(sysconfig.get_python_version())) |
628 |
cppflags.append('-DPYVER="{}"'.format(sysconfig.get_python_version())) |