Skip to content

[offload] Remove bogus offload-tblgen check for standalone build #119004

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

Merged
merged 1 commit into from
Dec 6, 2024

Conversation

mgorny
Copy link
Member

@mgorny mgorny commented Dec 6, 2024

fd3907c introduced a check for system offload-tblgen executable when doing a standalone build. This check is bogus, since offload-tblgen is built as part of offload and not some other preinstalled component. The path is also overwritten below, so the check only causes tests to be disabled unnecessarily.

CC @callumfare

fd3907c introduced a check for system
offload-tblgen executable when doing a standalone build.  This check
is bogus, since offload-tblgen is built as part of offload and not some
other preinstalled component.  The path is also overwritten below,
so the check only causes tests to be disabled unnecessarily.
@llvmbot
Copy link
Member

llvmbot commented Dec 6, 2024

@llvm/pr-subscribers-offload

Author: Michał Górny (mgorny)

Changes

fd3907c introduced a check for system offload-tblgen executable when doing a standalone build. This check is bogus, since offload-tblgen is built as part of offload and not some other preinstalled component. The path is also overwritten below, so the check only causes tests to be disabled unnecessarily.

CC @callumfare


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

1 Files Affected:

  • (modified) offload/cmake/OpenMPTesting.cmake (-11)
diff --git a/offload/cmake/OpenMPTesting.cmake b/offload/cmake/OpenMPTesting.cmake
index ff6001c4539f7d..8e955ff3992750 100644
--- a/offload/cmake/OpenMPTesting.cmake
+++ b/offload/cmake/OpenMPTesting.cmake
@@ -37,17 +37,6 @@ function(find_standalone_test_dependencies)
     return()
   endif()
 
-  find_program(OFFLOAD_TBLGEN_EXECUTABLE
-    NAMES offload-tblgen
-    PATHS ${OPENMP_LLVM_TOOLS_DIR})
-  if (NOT OFFLOAD_TBLGEN_EXECUTABLE)
-    message(STATUS "Cannot find 'offload-tblgen'.")
-    message(STATUS "Please put 'not' in your PATH, set OFFLOAD_TBLGEN_EXECUTABLE to its full path, or point OPENMP_LLVM_TOOLS_DIR to its directory.")
-    message(WARNING "The check targets will not be available!")
-    set(ENABLE_CHECK_TARGETS FALSE PARENT_SCOPE)
-    return()
-  endif()
-
   find_program(OPENMP_NOT_EXECUTABLE
     NAMES not
     PATHS ${OPENMP_LLVM_TOOLS_DIR})

Copy link
Member

@thesamesam thesamesam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Normally I'd say to wait to find out the intent but it's definitely wrong as-is and there's no harm that can come from fixing the standalone case now with this.

@mgorny mgorny merged commit 4a44e4b into llvm:main Dec 6, 2024
8 checks passed
@mgorny mgorny deleted the offload-fix-again branch December 6, 2024 18:21
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.

4 participants