Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[kitsune] Fixes to support building only a subset of targets #58

Merged
merged 1 commit into from
Nov 13, 2024

Conversation

tarunprabhu
Copy link
Collaborator

This should really be more than one patch because there are several unrelated issues here.

  • The kitsune tests look for a label identifying the linker executable, then check the same line to ensure that the correct libraries are present. Checking the linker reliably is a hassle because it can be very different depending on the platform (even within Linux'es, it can vary, and that is even before using LLD). The, admittedly suboptimal, changes here simply remove the check for the linker executable and assume that the line immediately following the compile line is the link line and check for linker flags/libraries there. It should work unless something major changes in clang which is, hopefully, unlikely.

  • If the Cuda target has not been enabled, Kitsune will fail to build because CudaABI.cpp expects to find certain variables. This could be a more general problem with the other ABI's as well, so we don't build them unless they have been enabled.

  • Because kitsune/ is only processed after the subdirectories of llvm/, the KITSUNE_*_ENABLED variables are not set when llvm/lib/Transforms/Tapir is processed, so we will not be able to determine which Tapir targets have been enabed. All the code to do that is moved from kitsune/CMakeLists.txt to llvm/CMakeLists.txt. It would be good if we could find a way to keep all the kitsune cmake code isolated, from the rest of LLVM's cmake, but this should be manageable during merges.

  • The names of the variables were changed from KITSUNE_ENABLE to KITSUNE_ENABLED (note the added trailing D) for consistency with the rest of the code.

This should really be more than one patch because there are several unrelated
issues here.

- The kitsune tests look for a label identifying the linker executable, then
  check the same line to ensure that the correct libraries are present. Checking
  the linker reliably is a hassle because it can be very different depending on
  the platform (even within Linux'es, it can vary, and that is even before
  using LLD). The, admittedly suboptimal, changes here simply remove the check
  for the linker executable and assume that the line immediately following the
  compile line is the link line and check for linker flags/libraries there. It
  should work unless something major changes in clang which is, hopefully,
  unlikely.

- If the Cuda target has not been enabled, Kitsune will fail to build because
  CudaABI.cpp expects to find certain variables. This could be a more general
  problem with the other ABI's as well, so we don't build them unless they have
  been enabled.

- Because kitsune/ is only processed after the subdirectories of llvm/, the
  KITSUNE_*_ENABLED variables are not set when llvm/lib/Transforms/Tapir is
  processed, so we will not be able to determine which Tapir targets have been
  enabed. All the code to do that is moved from kitsune/CMakeLists.txt to
  llvm/CMakeLists.txt. It would be good if we could find a way to keep all the
  kitsune cmake code isolated, from the rest of LLVM's cmake, but this should
  be manageable during merges.

- The names of the variables were changed from KITSUNE_*_ENABLE to
  KITSUNE_*_ENABLED (note the added trailing D) for consistency with the rest
  of the code.
@pmccormick pmccormick merged commit 3770907 into lanl:dev/19.x Nov 13, 2024
3 checks passed
@pmccormick
Copy link
Collaborator

LGTM.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants