CMakeLists: Fix REACTOR_EMIT_DEBUG_INFO builds ENABLE_RR_DEBUG_INFO was not being passed to the ReactorLLVM target. This introduced a subtle calling mismatch as the RValue<T> copy constructor is conditionally added only when ENABLE_RR_DEBUG_INFO is defined. This would cause parameters to go out of sync for inlined functions (not entirely sure I understand the underlying cause here), leading to hilarity. This change also moves "-fno-exceptions" back to the global cpp_flags. This is a true global setting and should not have been moved to SWIFTSHADER_COMPILE_OPTIONS. Change-Id: Ib20777f1ee4b443358ada667902f9a6a1ac3513a Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/29932 Tested-by: Ben Clayton <bclayton@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Reviewed-by: Nicolas Capens <nicolascapens@google.com>
diff --git a/CMakeLists.txt b/CMakeLists.txt index cfbad8e..d6df879 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt
@@ -229,8 +229,9 @@ add_definitions(-D_SBCS) # Single Byte Character Set (ASCII) else() set_cpp_flag("--std=c++11") + set_cpp_flag("-fno-exceptions") + list(APPEND SWIFTSHADER_COMPILE_OPTIONS - "-fno-exceptions" "-Wall" "-Werror=reorder" "-Werror=sign-compare" @@ -1883,6 +1884,7 @@ INCLUDE_DIRECTORIES "${COMMON_INCLUDE_DIR}" POSITION_INDEPENDENT_CODE 1 FOLDER "Core" + COMPILE_OPTIONS "${SWIFTSHADER_COMPILE_OPTIONS}" ) target_link_libraries(ReactorLLVM llvm ${OS_LIBS})