Skip to content

Conversation

@SchrodingerZhu
Copy link
Contributor

No description provided.

@llvmbot llvmbot added the libc label Dec 6, 2024
@llvmbot
Copy link
Member

llvmbot commented Dec 6, 2024

@llvm/pr-subscribers-libc

Author: Schrodinger ZHU Yifan (SchrodingerZhu)

Changes

Full diff: https://github.com/llvm/llvm-project/pull/119008.diff

1 Files Affected:

  • (modified) libc/test/src/__support/CPP/CMakeLists.txt (+12)
diff --git a/libc/test/src/__support/CPP/CMakeLists.txt b/libc/test/src/__support/CPP/CMakeLists.txt
index 2b4d6107b767d3..36757112525719 100644
--- a/libc/test/src/__support/CPP/CMakeLists.txt
+++ b/libc/test/src/__support/CPP/CMakeLists.txt
@@ -108,6 +108,18 @@ if(NOT LIBC_TARGET_ARCHITECTURE_IS_NVPTX)
   )
 endif()
 
+get_fq_target_name(atomic_test fq_atomic_test)
+if (LIBC_TARGET_ARCHITECTURE STREQUAL "riscv")
+  if (TARGET ${fq_atomic_test}.__unit__)
+    message(STATUS "adding atomic library to ${fq_atomic_test}.__unit__")
+    target_link_libraries(${fq_atomic_test}.__unit__ PUBLIC atomic)
+  endif()
+  if (TARGET ${fq_atomic_test}.__hermetic__)
+    message(STATUS "adding atomic library to ${fq_atomic_test}.__hermetic__")
+    target_link_libraries(${fq_atomic_test}.__unit__ PUBLIC atomic)
+  endif()
+endif()
+
 add_libc_test(
   stringstream_test
   SUITE

@SchrodingerZhu
Copy link
Contributor Author

I will suppress the test for 32bit platform instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants