[libc-commits] [PATCH] D149532: [libc] Enable running libc unit tests on NVPTX

Siva Chandra via Phabricator via libc-commits libc-commits at lists.llvm.org
Mon May 1 12:31:28 PDT 2023


sivachandra accepted this revision.
sivachandra added a comment.
This revision is now accepted and ready to land.

OK after addressing the inline comment.



================
Comment at: libc/test/UnitTest/CMakeLists.txt:17
+# The Nvidia 'nvlink' linker does not support static libraries.
+if(LIBC_GPU_TARGET_ARCHITECTURE_IS_NVPTX)
+  add_library(
----------------
Instead of large `if`/`else` block, can you do something like:

```
if(LIBC_GPU_TARGET_ARCHITECTURE_IS_NVPTX)
  set(library_type OBJECT)
else()
  set(library_type STATIC)
endif()
```

And then add ${library_type} to all of the libraries below.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D149532/new/

https://reviews.llvm.org/D149532



More information about the libc-commits mailing list