Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: b79359af12175bca7258e35b49c98208eca3cbf2
      
https://github.com/WebKit/WebKit/commit/b79359af12175bca7258e35b49c98208eca3cbf2
  Author: Richard Robinson <[email protected]>
  Date:   2025-10-13 (Mon, 13 Oct 2025)

  Changed paths:
    M Source/bmalloc/libpas/src/libpas/pas_utils.h
    M Source/bmalloc/libpas/src/libpas/pas_utils_prefix.h

  Log Message:
  -----------
  Fix the JavaScriptCore build in some configurations
https://bugs.webkit.org/show_bug.cgi?id=300635
rdar://162411683

Reviewed by Keith Miller.

First, some background:

1. The `asm` keyword is a supported keyword in C++, and GNU C. Notably however, 
it does not exist in non-GNU C standards.
Instead, the alternative keyword `__asm__` exists to serve the same purpose.

2. The bmalloc module map consists of a `pas` submodule, which participates in 
header fusion. This means that if a client
uses any of the headers in it, it implicitly imports all the other headers. 
This is expected and desired behavior.

3. The JavaScriptCore private module map defines a submodule 
"PASReportCrashPrivate" which contains the associated header,
and PASReportCrashPrivate.h transitively depends on at least one of the headers 
in the `bmalloc.pas` modules.

4. Within the bmalloc.pas module is pas_utils.h and pas_utils_prefix.h, both of 
which use the `asm` keyword.

As a result of all of these, the JavaScriptCore private module map depends on 
the existence of the `asm` keyword in all cases,
whereas before it was limited to the inclusion of specific headers. 
Consequently, any non-GNU C clients of the JavaScriptCore private
module will fail to compile because `asm` does not exist.

Fix by moving to `__asm__` which is available everywhere.

* Source/bmalloc/libpas/src/libpas/pas_utils.h:
(pas_assertion_failed):
(pas_reverse):
(pas_reverse64):
(pas_atomic_store_uint8):
(pas_compare_and_swap_uint8_weak):
(pas_compare_and_swap_uint8_strong):
(pas_compare_and_swap_uint16_weak):
(pas_compare_and_swap_uint32_weak):
(pas_compare_and_swap_uint32_strong):
(pas_compare_and_swap_uint64_weak):
(pas_compare_and_swap_uint64_strong):
(pas_store_store_fence):
(pas_opaque):
(pas_compare_and_swap_pair_weak):
(pas_compare_and_swap_pair_strong):
(pas_atomic_store_pair):
(pas_compare_ptr_opaque):
* Source/bmalloc/libpas/src/libpas/pas_utils_prefix.h:
(__pas_compiler_fence):
(__pas_fence):
(__pas_depend_impl):

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to