0

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?

mauro
  • 504
  • 3
  • 14

1 Answers1

1

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.

joni
  • 6,840
  • 2
  • 13
  • 20
  • thank you for your reply and as a side note, thanks to that I noticed that actually the compiler flag /Ox (same as /O2 for maximum speed) is the default one used during compilation – mauro Sep 29 '21 at 10:21