diff --git a/BREAKING_CHANGES.md b/BREAKING_CHANGES.md index bc3f80ceef..b89cf87a3f 100644 --- a/BREAKING_CHANGES.md +++ b/BREAKING_CHANGES.md @@ -2,6 +2,37 @@ # develop +## Change + +The "Debug Information Format" flag has been changed to "/Zi" from "/Z7" when +building JUCE on Windows using CMake. + +**Possible Issues** + +Some CI tooling (e.g., sscache) may experience issues writing debug information. +Debug information will no longer be stored inside the object files during the +build process. + +**Workaround** + +You can override the "Debug Information Format" flag with the +"CMAKE_MSVC_DEBUG_INFORMATION_FORMAT" which is available under policy "CMP0141". + +This can be enabled at configuration time: + -DCMAKE_POLICY_DEFAULT_CMP0141=NEW + -DCMAKE_MSVC_DEBUG_INFORMATION_FORMAT=Embedded (for "/Z7") + or + -DCMAKE_MSVC_DEBUG_INFORMATION_FORMAT=ProgramDatabase (for "/Zi") + +**Rationale** + +The previous change to "/Z7" for the "Debug Information Format" flag caused +build artefacts to drastically increase in size in some configurations, which +could lead to build failures. In particular, when link-time code-generation is +enabled, .obj files generated with the debug info mode set to "Z7" or "None" +may be much larger than when using "Zi" instead. + + ## Change The AudioFormat class now only has one virtual createWriterFor member function: diff --git a/extras/Build/CMake/JUCEHelperTargets.cmake b/extras/Build/CMake/JUCEHelperTargets.cmake index b1aaa0513e..e82dc69806 100644 --- a/extras/Build/CMake/JUCEHelperTargets.cmake +++ b/extras/Build/CMake/JUCEHelperTargets.cmake @@ -134,7 +134,7 @@ if((CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") OR (CMAKE_CXX_COMPILER_FRONTEND_VARIA endif() if(needs_debug_flag) - target_compile_options(juce_recommended_config_flags INTERFACE $<${debug_config}:/Z7>) + target_compile_options(juce_recommended_config_flags INTERFACE $<${debug_config}:/Zi>) endif() elseif((CMAKE_CXX_COMPILER_ID STREQUAL "Clang") OR (CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")