Skip to content

Commit facd55a

Browse files
committed
Set /Os for some 32 bit MS compilers (fixes #3769)
Signed-off-by: Stefan Weil <sw@weilnetz.de>
1 parent fd48287 commit facd55a

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/arch/intsimdmatrixavx2.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,14 @@
2727
# include <cstdint>
2828
# include <vector>
2929

30+
# if defined(_MSC_VER) && _MSC_VER >= 1925 && _MSC_VER <= 1929 && \
31+
defined(_WIN32) && !defined(_WIN64)
32+
// Optimize for size (/Os) instead of using the default optimization for some
33+
// versions of the 32 bit Visual Studio compiler which generate buggy code.
34+
# pragma optimize("", off)
35+
# pragma optimize("s", on)
36+
# endif
37+
3038
namespace tesseract {
3139

3240
// Number of outputs held in each register. 8 x 32 bit ints.

0 commit comments

Comments
 (0)