Skip to content
  • Nathan Froyd's avatar
    f51359bd
    Bug 1325632 - part 5 - ensure that we compile with -fno-sized-deallocation... · f51359bd
    Nathan Froyd authored
    Bug 1325632 - part 5 - ensure that we compile with -fno-sized-deallocation when possible; r=chmanchester
    
    We currently turn off the C++14 sized-deallocation facility on MSVC, and
    we'd like to ensure we do the same thing for clang and gcc.  To do so,
    we add new functionality to moz.configure for checking and adding
    compilation flags, similar to the facility for checking and adding
    warning flags.  The newly added facility is then used to add
    -fno-sized-deallocation to the compilation flags, when the option is
    supported.
    
    Once we do this, we can't define the sized deallocation functions in
    mozalloc.h; the compiler will complain that we are using
    -fno-sized-deallocation, yet defining these special functions that we'll
    never use.  These functions were added for MinGW, where we needed to
    compile with C++14 ahead of other platforms to be compatible with MSVC
    headers.  But they're no longer necessary, though they would be if we
    removed -fno-sized-deallocation; the compiler will complain if we do
    that and we'll add them back at that point.
    f51359bd
    Bug 1325632 - part 5 - ensure that we compile with -fno-sized-deallocation...
    Nathan Froyd authored
    Bug 1325632 - part 5 - ensure that we compile with -fno-sized-deallocation when possible; r=chmanchester
    
    We currently turn off the C++14 sized-deallocation facility on MSVC, and
    we'd like to ensure we do the same thing for clang and gcc.  To do so,
    we add new functionality to moz.configure for checking and adding
    compilation flags, similar to the facility for checking and adding
    warning flags.  The newly added facility is then used to add
    -fno-sized-deallocation to the compilation flags, when the option is
    supported.
    
    Once we do this, we can't define the sized deallocation functions in
    mozalloc.h; the compiler will complain that we are using
    -fno-sized-deallocation, yet defining these special functions that we'll
    never use.  These functions were added for MinGW, where we needed to
    compile with C++14 ahead of other platforms to be compatible with MSVC
    headers.  But they're no longer necessary, though they would be if we
    removed -fno-sized-deallocation; the compiler will complain if we do
    that and we'll add them back at that point.
Loading