/O2 vs /Ox

When creating an audio plugin project with a VS2015 exporter, there are three options for optimization in the Projucer (no optimization, minimum size, maximum speed), but there are four possibilities in Visual Studio (the above + full optimization (/Ox))). Moreover, with “maximum speed” selected in Projucer, I get “full optimization” in Visual Studio. Would it be possible to differentiate this better?
I’ve stumbled upon this, by the way, because I’ve found that with /Ox a lot of private strings that I’d like to disappear from the release build are still present in the binary, while they are stripped when using /O2. Kind of odd, but that’s the way it seems to be.

I don’t think you can rely on optimisation settings to do string stripping for you. It’s likely to be platform dependant and subject to change.
If you need to hide stings I’d use the Projucer’s string obfuscation command line tool.

Ok, that might be an option although it is a bit tedious to create a function for every string one wants to hide… but to get back to the question as such: it should be possible to have all four options (/Od, /O1, /O2 and /Ox) in Projucer for Visual Studio projects?

I’ve added this, it should be on develop shortly.

1 Like