From a5fbe03133a69a54602470e82dd30cd5667dceac Mon Sep 17 00:00:00 2001 From: Nicolas F Date: Sun, 16 May 2021 18:00:51 +0200 Subject: [PATCH] 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. --- setup.py | 1 + 1 file changed, 1 insertion(+) diff --git a/setup.py b/setup.py index af0abd6..19a2934 100755 --- a/setup.py +++ b/setup.py @@ -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("-Wdeclaration-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