Skip to content

Commit 5206e88

Browse files
committed
MSVC bug.
1 parent d31009e commit 5206e88

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

CMakeLists.txt

+5-3
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,15 @@ set(CMAKE_VERBOSE_MAKEFILE ON)
2929
# ==12635== by 0x4896564: (below main) (libc-start.c:332)
3030
string(REGEX MATCH "Linux" PROJECT_OS_LINUX ${CMAKE_SYSTEM_NAME})
3131

32-
# Use -O2 by now until we can find why string_function is NULL
3332
if(PROJECT_OS_LINUX)
33+
# -O3 not supported, use -O2 by now until we can find why string_function is NULL
3434
set(CMAKE_C_FLAGS_RELEASE "-O2")
3535
set(CMAKE_CXX_FLAGS_RELEASE "-O2")
3636
elseif(WIN32)
37-
# set(CMAKE_C_FLAGS_RELEASE "/O1")
38-
# set(CMAKE_CXX_FLAGS_RELEASE "/O1")
37+
# /O2 and /O2b not supported, use /O1 /Ob1 by now until we
38+
# can find why string_function is an non-NULL invalid pointer
39+
set(CMAKE_C_FLAGS_RELEASE "/O1")
40+
set(CMAKE_CXX_FLAGS_RELEASE "O1")
3941
endif()
4042

4143
# Default build type

0 commit comments

Comments
 (0)