0

setup.py: make sure to enable -O3 on unix

Apparently my -O3 came from somewhere other than this script.
It's possible that there is some generic "use optimisations"
mechanism in setuptools/distutils/whateverthisis, but I don't feel
like opening up that can of worms so let's just add an -O3 extra
argument to the compiler invocation to make sure it always gets it.
This commit is contained in:
Nicolas F
2021-05-16 18:00:51 +02:00
parent a5e2f182af
commit a5fbe03133

View File

@@ -297,6 +297,7 @@ class CustomBuildExt(build_ext):
e.extra_compile_args.append("-Wno-unused-function") # quell some annoying warnings e.extra_compile_args.append("-Wno-unused-function") # quell some annoying warnings
e.extra_compile_args.append("-Wdeclaration-after-statement") e.extra_compile_args.append("-Wdeclaration-after-statement")
e.extra_compile_args.append("-Werror=declaration-after-statement") e.extra_compile_args.append("-Werror=declaration-after-statement")
e.extra_compile_args.append("-O3")
# build in place, and in the build/ tree # build in place, and in the build/ tree