Bug 312733
| Summary: | [libpas] Fix libpas standalone build | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | zak ridouh <zakr> |
| Component: | New Bugs | Assignee: | zak ridouh <zakr> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
zak ridouh
311133@main removed includes from headers whose macro bodies are guarded
by PAS_ENABLE_ISO / PAS_ENABLE_HOTBIT. These macros are 0 in WebKit
(PAS_BMALLOC=1) but 1 in the libpas standalone build, so the includes
were silently required by the standalone build. Restore them inside the
#if PAS_ENABLE_* guards so WebKit keeps the build-speed win.
Also fix several pre-existing issues that surface once the standalone
build gets past the include errors:
- Guard <stdatomic.h> in pas_utils.h for C-only. It conflicts with C++
<atomic> before C++23 and breaks Verifier.cpp. The macros that use
atomics (PAS_ATOMIC_TYPE / PAS_ATOMIC_LOAD_RELAXED) only use the
_Atomic keyword and __c11_atomic_* clang builtins, neither of which
needs the header.
- Restore <pthread/tsd_private.h> in pas_utils.h. TSDTests.cpp and
pas_fast_tls.h depend on pthread_key_init_np,
_pthread_setspecific_direct, and __PTK_FRAMEWORK_* keys from it.
- Add missing bmalloc_iso_allocate_array_by_size and
bmalloc_try_iso_allocate_array_by_size definitions to
bmalloc_heap_iso.c. They're declared in bmalloc_heap.h but were lost
in db6887c9076e when bmalloc_heap.c was split.
- Add 'static' to the 9 PAS_ALWAYS_INLINE functions in pas_mte.h. C99
inline semantics require an external definition when the compiler
chooses not to inline (which happens in Debug, where PAS_ALWAYS_INLINE
drops __attribute__((always_inline))). The codebase convention is
'static PAS_ALWAYS_INLINE' for header-only inline functions (489
occurrences across 87 files); the pas_mte.h functions are anomalies.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/175129910>
zak ridouh
Pull request: https://github.com/WebKit/WebKit/pull/63084
EWS
Committed 311770@main (d7b3180cbfe8): <https://commits.webkit.org/311770@main>
Reviewed commits have been landed. Closing PR #63084 and removing active labels.