[llvm] [llvm-install-name-tool] Error on non-Mach-O binaries (PR #90351)
James Henderson via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 29 00:51:21 PDT 2024
================
@@ -0,0 +1,26 @@
+## This test checks general llvm-install-name-tool behavior
+
+# RUN: yaml2obj %s -o %t
+
+## Passing a non-Mach-O binary
+# RUN: not llvm-install-name-tool -add_rpath foo %t 2>&1 | FileCheck %s --check-prefix=NON_MACH_O
+
+# NON_MACH_O: llvm-install-name-tool: error: input file: {{.*}} is not a Mach-O file
+
+--- !ELF
+FileHeader:
+ Class: ELFCLASS64
+ Data: ELFDATA2LSB
+ Type: ET_EXEC
+ Machine: EM_X86_64
----------------
jh7370 wrote:
IIRC, the Machine line is not necessary and a "sensible" default is used that should have no bearing on the test, so delete it.
https://github.com/llvm/llvm-project/pull/90351
More information about the llvm-commits
mailing list