Uploaded image for project: 'Core ReactOS'
  1. Core ReactOS
  2. CORE-14373

MsVC: Use "/GF, Pools strings and places them in read-only memory" for Debug builds too

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Fix Version/s: 0.4.12
    • Component/s: Build System
    • Labels:
      None

      Description

      Noticed in ROSTESTS-298, which would be nice to reproduce/detect with MsVC Debug builds too.

      msvc.cmake

         3 if(CMAKE_BUILD_TYPE STREQUAL "Debug")
         4     # no optimization
         5     add_compile_flags("/Ob0 /Od")
         6 elseif(CMAKE_BUILD_TYPE STREQUAL "Release")
         7     add_compile_flags("/Ox /Ob2 /Ot /Oy /GT /GF")
      ...

      (MsDN) /Gf, /GF (Eliminate Duplicate Strings)

      Why do compilers allow string literals not to be const?
      says this behavior is not the default for historical reasons...

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                hbelusca hbelusca
                Reporter:
                Serge Gautherie Serge Gautherie
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: