Disable ZXing size optimization for MinGW GCC string link issue
This commit is contained in:
1 parent
05064f7f3d
commit
e4c591e1e6
2 files changed
+13
-1
No files matched your search
@@ -677,7 +677,10 @@ if (NOT ZXING_DISABLE_PCH)
|
||||
target_precompile_headers(ZXing PRIVATE ${PRECOMPILE_HEADERS})
|
||||
endif()
|
||||
|
||||
if(CMAKE_BUILD_TYPE MATCHES "Release|RelWithDebInfo")
|
||||
# MinGW GCC с -Os даёт ошибку линковки move-конструктора std::string (MSYS2 #31015).
|
||||
if(MINGW AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
||||
message(STATUS "ZXing: per-source -Os disabled for MinGW GCC (MSYS2 #31015)")
|
||||
elseif(CMAKE_BUILD_TYPE MATCHES "Release|RelWithDebInfo")
|
||||
# The following is a list of translation units that fulfill two criteria regarding the use of -Os vs -O3:
|
||||
# 1. their binary size decreases significantly
|
||||
# 2. the runtime of ReaderTest is not (measurably) affected
|
||||
|
||||
Reference in new issue
Block a user