Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 13415f9ed9f36031adf472fe9d28ee118b7229a5
      
https://github.com/WebKit/WebKit/commit/13415f9ed9f36031adf472fe9d28ee118b7229a5
  Author: Geoffrey Garen <[email protected]>
  Date:   2026-05-16 (Sat, 16 May 2026)

  Changed paths:
    M Source/JavaScriptCore/CMakeLists.txt
    M Source/JavaScriptCore/Configurations/Base.xcconfig
    M Source/WTF/Configurations/Base.xcconfig
    M Source/WTF/wtf/CMakeLists.txt
    M Source/WebCore/CMakeLists.txt
    M Source/WebCore/Configurations/Base.xcconfig
    M Source/WebCore/PAL/Configurations/Base.xcconfig
    M Source/WebCore/PAL/pal/CMakeLists.txt
    M Source/WebCore/page/linux/ResourceUsageThreadLinux.cpp
    M Source/WebCore/platform/SharedBufferChunkReader.cpp
    M Source/WebCore/platform/graphics/WOFFFileFormat.cpp
    M Source/WebCore/platform/graphics/egl/GLContext.cpp
    M Source/WebCore/platform/graphics/skia/ComplexTextControllerSkia.cpp
    M Source/WebCore/platform/graphics/texmap/TextureMapper.cpp
    M Source/WebCore/platform/graphics/texmap/TextureMapperLayer.cpp
    M Source/WebCore/platform/image-decoders/jpeg/JPEGImageDecoder.cpp
    M Source/WebCore/platform/image-decoders/webp/WEBPImageDecoder.cpp
    M Source/WebGPU/Configurations/Base.xcconfig
    M Source/WebInspectorUI/Configurations/Base.xcconfig
    M Source/WebKit/CMakeLists.txt
    M Source/WebKit/Configurations/Base.xcconfig
    M Source/bmalloc/bmalloc/Gigacage.h

  Log Message:
  -----------
  [Build Speed] Remove -fsafe-buffer-usage-suggestions
https://bugs.webkit.org/show_bug.cgi?id=314917
rdar://177195835

Reviewed by Mike Wyrzykowski and Ryosuke Niwa.

To give good suggestions, this option traverses the whole AST, including
precompiled headers and modules.

This costs 25% build time in CMake mac-dev-debug, and 75% if you disable
unified builds.

-Wunsafe-buffer-usage is our main goal for SaferCPP, not
-fsafe-buffer-usage-suggestions, and we rarely need a suggestion for how to
fix anyway, since the answer is almost always span or std::array.

(Note: Until we have the fix for 
https://github.com/llvm/llvm-project/pull/198006,
-Wunsafe-buffer-usage has equal cost. So for now this patch alone is only a
small speedup.)

Also extend several existing WTF_ALLOW_UNSAFE_BUFFER_USAGE_BEGIN/END regions.
With -fsafe-buffer-usage-suggestions, clang reports one diagnostic per unsafe
*variable* (at its declaration), so wrapping the declaration alone was
sufficient. Without it, clang reports one diagnostic per unsafe *operation*,
so the region must cover every subscript/arithmetic use.

* Source/JavaScriptCore/CMakeLists.txt:
* Source/JavaScriptCore/Configurations/Base.xcconfig:
* Source/WTF/Configurations/Base.xcconfig:
* Source/WTF/wtf/CMakeLists.txt:
* Source/WebCore/CMakeLists.txt:
* Source/WebCore/Configurations/Base.xcconfig:
* Source/WebCore/PAL/Configurations/Base.xcconfig:
* Source/WebCore/PAL/pal/CMakeLists.txt:
* Source/WebCore/page/linux/ResourceUsageThreadLinux.cpp:
(WebCore::collectCPUUsage):
* Source/WebCore/platform/graphics/WOFFFileFormat.cpp:
(WebCore::convertWOFFToSfnt):
* Source/WebCore/platform/graphics/egl/GLContext.cpp:
(WebCore::GLContext::isExtensionSupported):
* Source/WebCore/platform/graphics/skia/ComplexTextControllerSkia.cpp:
(WebCore::ComplexTextController::ComplexTextRun::ComplexTextRun):
* Source/WebCore/platform/graphics/texmap/TextureMapper.cpp:
(WebCore::computeGaussianKernel):
* Source/WebCore/platform/graphics/texmap/TextureMapperLayer.cpp:
(WebCore::transformedBoundingBox):
* Source/WebCore/platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
(WebCore::setPixel):
* Source/WebCore/platform/image-decoders/webp/WEBPImageDecoder.cpp:
(WebCore::WEBPImageDecoder::applyPostProcessing):
* Source/WebGPU/Configurations/Base.xcconfig:
* Source/WebInspectorUI/Configurations/Base.xcconfig:
* Source/WebKit/CMakeLists.txt:
* Source/WebKit/Configurations/Base.xcconfig:
* Source/bmalloc/bmalloc/Gigacage.h:
(Gigacage::addressOfBasePtr):

Canonical link: https://commits.webkit.org/313365@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to