Home > Mobile >  Cython: compiler flag -O3 seems deprecated
Cython: compiler flag -O3 seems deprecated

Time:09-30

I used the details provided in this question to set the optimization flag to '-o3'. However, I have the following issue:

  • if I use the upper case as extra_compile_args=['-O3'], I get the warning: cl : Command line warning D9002 : ignoring unknown option '-O3'
  • if I use the lower case as extra_compile_args=['-o3'], I get the warning: cl : Command line warning D9035 : option 'o' has been deprecated and will be removed in a future release

How can I solve this?

CodePudding user response:

The -O3 flag is only supported by gcc and clang. Since you seem to be using the MSVC compiler, you can use the /Ox flag, see here for more details.

  • Related