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

    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

              hbelusca hbelusca
              Serge Gautherie Serge Gautherie
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: