Skip to content

Commit

Permalink
Set /Os for some 32 bit MS compilers (fixes tesseract-ocr#3769)
Browse files Browse the repository at this point in the history
Signed-off-by: Stefan Weil <[email protected]>
  • Loading branch information
stweil committed Mar 31, 2022
1 parent fd48287 commit facd55a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/arch/intsimdmatrixavx2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit facd55a

Please sign in to comment.