openmp: add atomic to SANITIZER_COMMON_LINK_LIBS for MIPS (#179933)

atomic is needed explicitly for MIPS.
This commit is contained in:
YunQiang Su 2026-02-06 08:17:56 +08:00 committed by GitHub
parent 2b3d97ad2d
commit 74e9bc6cb9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -152,6 +152,10 @@ else()
"Appended user specified linked libs flags. (e.g., -lm)")
endif()
if("${LIBOMP_ARCH}" STREQUAL "mips" OR "${LIBOMP_ARCH}" STREQUAL "mips64")
set(LIBOMP_LIBFLAGS "${LIBOMP_LIBFLAGS} -latomic")
endif()
# Should the libomp library and generated headers be copied into the original source exports/ directory
# Turning this to FALSE aids parallel builds to not interfere with each other.
# Currently, the testsuite module expects the just built OpenMP library to be located inside the exports/