You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
50 lines
1.9 KiB
50 lines
1.9 KiB
3 years ago
|
diff --git a/setup.py b/setup.py
|
||
|
index ce5309ee..9cb59461 100755
|
||
|
--- a/setup.py
|
||
|
+++ b/setup.py
|
||
|
@@ -278,7 +278,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'),
|
||
|
@@ -289,7 +289,7 @@ def init_env(
|
||
|
cflags_ = os.environ.get(
|
||
|
'OVERRIDE_CFLAGS', (
|
||
|
'-Wextra {} -Wno-missing-field-initializers -Wall -Wstrict-prototypes {}'
|
||
|
- ' -pedantic-errors -Werror {} {} -fwrapv {} {} -pipe {} -fvisibility=hidden {}'
|
||
|
+ ' -pedantic-errors {} {} -fwrapv {} {} {} -fvisibility=hidden {}'
|
||
|
).format(
|
||
|
float_conversion,
|
||
|
'' if is_openbsd else '-std=c11',
|
||
|
@@ -306,7 +306,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')
|
||
|
@@ -764,7 +764,7 @@ def safe_makedirs(path: str) -> None:
|
||
|
|
||
|
|
||
|
def build_launcher(args: Options, launcher_dir: str = '.', bundle_type: str = 'source') -> None:
|
||
|
- cflags = '-Wall -Werror -fpie'.split()
|
||
|
+ cflags = '-Wall -fpie'.split()
|
||
|
cppflags = []
|
||
|
libs: List[str] = []
|
||
|
if args.profile or args.sanitize:
|
||
|
@@ -776,8 +776,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()))
|