Set /Os for some 32 bit MS compilers (fixes #3769)

Signed-off-by: Stefan Weil <sw@weilnetz.de>
This commit is contained in:
Stefan Weil 2022-03-30 16:03:07 +02:00
parent fd48287c02
commit facd55ab5c

View File

@ -27,6 +27,14 @@
# include <cstdint>
# include <vector>
# if defined(_MSC_VER) && _MSC_VER >= 1925 && _MSC_VER <= 1929 && \
defined(_WIN32) && !defined(_WIN64)
// Optimize for size (/Os) instead of using the default optimization for some
// versions of the 32 bit Visual Studio compiler which generate buggy code.
# pragma optimize("", off)
# pragma optimize("s", on)
# endif
namespace tesseract {
// Number of outputs held in each register. 8 x 32 bit ints.