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
52
53
54
|
diff --git a/setup.py b/setup.py
index f751107f..69bf39d4 100755
--- a/setup.py
+++ b/setup.py
@@ -293,7 +293,7 @@ def init_env(
df += ' -Og'
float_conversion = '-Wfloat-conversion'
fortify_source = '' if sanitize and is_macos else '-D_FORTIFY_SOURCE=2'
- 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'),
@@ -308,8 +308,8 @@ def init_env(
cflags_ = os.environ.get(
'OVERRIDE_CFLAGS', (
f'-Wextra {float_conversion} -Wno-missing-field-initializers -Wall -Wstrict-prototypes {std}'
- f' {werror} {optimize} {sanitize_flag} -fwrapv {stack_protector} {missing_braces}'
- f' -pipe {march} -fvisibility=hidden {fortify_source}'
+ f' {optimize} {sanitize_flag} -fwrapv {stack_protector} {missing_braces}'
+ f' {march} -fvisibility=hidden {fortify_source}'
)
)
cflags = shlex.split(cflags_) + shlex.split(
@@ -317,7 +317,7 @@ def init_env(
)
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')
@@ -789,10 +789,7 @@
def build_launcher(args: Options, launcher_dir: str = '.', bundle_type: str = 'source') -> None:
- werror = '' if args.ignore_compiler_warnings else '-pedantic-errors -Werror'
- cflags = f'-Wall {werror} -fpie'.split()
- if args.build_universal_binary:
- cflags += '-arch x86_64 -arch arm64'.split()
+ cflags = f'-Wall -fpie'.split()
cppflags = []
libs: List[str] = []
if args.profile or args.sanitize:
@@ -803,8 +801,6 @@ def build_launcher(args: Options, launcher_dir: str = '.', bundle_type: str = 's
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()))
|