1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
--- kitty-9999/setup.py 2019-07-16 18:04:24.052780940 -0500
+++ kitty-9999/setup.py 2019-07-16 18:05:54.564383192 -0500
@@ -202,7 +202,7 @@
df = '-g3'
if ccver >= (5, 0):
df += ' -Og'
- optimize = df if debug or sanitize else '-O3'
+ optimize = ''
sanitize_args = get_sanitize_args(cc, ccver) if sanitize else set()
cppflags = os.environ.get(
'OVERRIDE_CPPFLAGS', '-D{}DEBUG'.format('' if debug else 'N'),
@@ -213,7 +213,7 @@
cflags = os.environ.get(
'OVERRIDE_CFLAGS', (
'-Wextra -Wno-missing-field-initializers -Wall -Wstrict-prototypes -std=c11'
- ' -pedantic-errors -Werror {} {} -fwrapv {} {} -pipe {} -fvisibility=hidden'
+ ' -pedantic-errors {} {} -fwrapv {} {} {} -fvisibility=hidden'
).format(
optimize,
' '.join(sanitize_args),
@@ -227,7 +227,7 @@
)
ldflags = os.environ.get(
'OVERRIDE_LDFLAGS',
- '-Wall ' + ' '.join(sanitize_args) + ('' if debug else ' -O3')
+ '-Wall ' + ' '.join(sanitize_args)
)
ldflags = shlex.split(ldflags)
ldflags.append('-shared')
@@ -606,20 +606,17 @@
def build_launcher(args, launcher_dir='.', bundle_type='source'):
- cflags = '-Wall -Werror -fpie'.split()
+ cflags = '-Wall -fpie'.split()
cppflags = []
libs = []
if args.profile or args.sanitize:
if args.sanitize:
- cflags.append('-g3')
cflags.extend(get_sanitize_args(env.cc, env.ccver))
libs += ['-lasan'] if env.cc == 'gcc' and not is_macos else []
else:
cflags.append('-g')
if args.profile:
libs.append('-lprofiler')
- else:
- cflags.append('-O3')
if bundle_type.endswith('-freeze'):
cppflags.append('-DFOR_BUNDLE')
cppflags.append('-DPYVER="{}"'.format(sysconfig.get_python_version()))
|