From ae1198a7c4e97f9d2177b83369ba422649a08253 Mon Sep 17 00:00:00 2001 From: Charles Pritchard Date: Sun, 9 Mar 2025 13:35:30 -0700 Subject: [PATCH 1/4] lseek64 in raw_ostream.cpp HAVE_LSEEK64 is triggering true, in musl aarch64 llvm they are just using sleek, and the global namespace is also having an error --- external/llvh/lib/Support/raw_ostream.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/external/llvh/lib/Support/raw_ostream.cpp b/external/llvh/lib/Support/raw_ostream.cpp index 7873384e516..29d8dd8aab1 100644 --- a/external/llvh/lib/Support/raw_ostream.cpp +++ b/external/llvh/lib/Support/raw_ostream.cpp @@ -736,6 +736,7 @@ uint64_t raw_fd_ostream::seek(uint64_t off) { flush(); #ifdef _WIN32 pos = ::_lseeki64(FD, off, SEEK_SET); +# FIXME: https://reviews.llvm.org/D139752?id=484363 #elif defined(HAVE_LSEEK64) pos = ::lseek64(FD, off, SEEK_SET); #else From 47444ea9ca47f57fb056d3b1b5d29cbc508d270a Mon Sep 17 00:00:00 2001 From: Charles Pritchard Date: Sun, 9 Mar 2025 21:11:47 -0700 Subject: [PATCH 2/4] includes for implicit string include --- API/hermes/cdp/DomainState.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/API/hermes/cdp/DomainState.cpp b/API/hermes/cdp/DomainState.cpp index cfdd816e8c6..32558487db0 100644 --- a/API/hermes/cdp/DomainState.cpp +++ b/API/hermes/cdp/DomainState.cpp @@ -5,6 +5,9 @@ * LICENSE file in the root directory of this source tree. */ +#include +#include +#include #include "DomainState.h" #include From 9b0bfde147b3dd95828f0c0dcae31fe4fbe8e80a Mon Sep 17 00:00:00 2001 From: Charles Pritchard Date: Sun, 9 Mar 2025 21:57:54 -0700 Subject: [PATCH 3/4] capabilities annotation on std:mutex --- API/hermes/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/API/hermes/CMakeLists.txt b/API/hermes/CMakeLists.txt index 16ab217d2f7..3838be429e8 100644 --- a/API/hermes/CMakeLists.txt +++ b/API/hermes/CMakeLists.txt @@ -84,9 +84,9 @@ if(HERMES_THREAD_SAFETY_ANALYSIS) AsyncDebuggerAPI.cpp ${CDP_API_SOURCES} ) - if("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang") + if("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang") # warning instead for struggle with std:mutex capabilities annotation set_property(SOURCE ${TSA_SOURCES} APPEND_STRING PROPERTY - COMPILE_FLAGS "-Wthread-safety -Werror=thread-safety-analysis -Werror=thread-safety-precise -D_LIBCPP_ENABLE_THREAD_SAFETY_ANNOTATIONS") + COMPILE_FLAGS "-Wthread-safety -Wthread-safety-analysis -Werror=thread-safety-precise -D_LIBCPP_ENABLE_THREAD_SAFETY_ANNOTATIONS") endif() endif() From 263778e2c744455739691fc4ef4079695aa718ea Mon Sep 17 00:00:00 2001 From: Charles Pritchard Date: Sun, 9 Mar 2025 22:05:14 -0700 Subject: [PATCH 4/4] Update raw_ostream.cpp --- external/llvh/lib/Support/raw_ostream.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/external/llvh/lib/Support/raw_ostream.cpp b/external/llvh/lib/Support/raw_ostream.cpp index 29d8dd8aab1..a61cf0e169c 100644 --- a/external/llvh/lib/Support/raw_ostream.cpp +++ b/external/llvh/lib/Support/raw_ostream.cpp @@ -737,10 +737,10 @@ uint64_t raw_fd_ostream::seek(uint64_t off) { #ifdef _WIN32 pos = ::_lseeki64(FD, off, SEEK_SET); # FIXME: https://reviews.llvm.org/D139752?id=484363 -#elif defined(HAVE_LSEEK64) +#elif defined(NOT_HAVE_LSEEK64) pos = ::lseek64(FD, off, SEEK_SET); #else - pos = ::lseek(FD, off, SEEK_SET); + pos = lseek(FD, off, SEEK_SET); #endif if (pos == (uint64_t)-1) error_detected(std::error_code(errno, std::generic_category()));