This is an archive of the discontinued LLVM Phabricator instance.

[libc] Can build amdgpu libc even if rocm is missing
ClosedPublic

Authored by JonChesterfield on Jun 22 2023, 12:29 PM.

Details

Summary

Clang defaults to failing to build if it can't find rocm device libs

Diff Detail

Event Timeline

Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptJun 22 2023, 12:29 PM
JonChesterfield requested review of this revision.Jun 22 2023, 12:29 PM

This should be present in _get_common_compile_options and always passed in. Which scenario is it not present?

jhuber6 accepted this revision.Jun 22 2023, 12:44 PM

LG after addressing comments.

Never caught this because if you can build the tests you presumably had HSA. But we definitely don't want vendor libraries for these builds, thanks.

libc/cmake/modules/LLVMLibCObjectRules.cmake
154

Redundant.

libc/cmake/modules/LLVMLibCTestRules.cmake
578

Add here as well for NVPTX.

This revision is now accepted and ready to land.Jun 22 2023, 12:44 PM
  • drop first attempt
  • nvptx as well
JonChesterfield added a comment.EditedJun 22 2023, 12:51 PM

This shows up if you've built / installed HSA but rocm device libs is refusing to build with trunk and you've chosen against trying to patch it up locally.

This revision was landed with ongoing or failed builds.Jun 22 2023, 1:19 PM
This revision was automatically updated to reflect the committed changes.