[lld] [LLD][COFF] Validate import library machine type. (PR #102738)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 26 07:45:22 PDT 2024
================
@@ -0,0 +1,32 @@
+# REQUIRES: x86
+# RUN: split-file %s %t.dir
+# RUN: llvm-lib -machine:i386 -out:%t.dir/test32.lib -def:%t.dir/test32.def
+# RUN: llvm-lib -machine:amd64 -out:%t.dir/test64.lib -def:%t.dir/test64.def
+# RUN: llvm-mc -triple i686-windows-msvc %t.dir/test.s -filetype=obj -o %t.dir/test32.obj
+# RUN: llvm-mc -triple x86_64-windows-msvc %t.dir/test.s -filetype=obj -o %t.dir/test64.obj
+
+# RUN: not lld-link -dll -noentry -out:%t32.dll %t.dir/test32.obj %t.dir/test64.lib 2>&1 | FileCheck --check-prefix=ERR32 %s
+# ERR32: error: test.dll: machine type x64 conflicts with x86
----------------
zmodem wrote:
The machine type is on "test64.lib", so shouldn't that be used in the error message instead? Otherwise it can get pretty confusing for a user to track down where "test.dll" comes from.
https://github.com/llvm/llvm-project/pull/102738
More information about the llvm-commits
mailing list