[PATCH] D121553: [lld-link] Tweak winsysroottest.test to have passing links on happy path
Nico Weber via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Mar 13 08:18:33 PDT 2022
thakis created this revision.
thakis added a reviewer: hans.
Herald added a project: All.
thakis requested review of this revision.
Previously, the test checked for a "undefined symbol" error
(instead of the "could not open std*.lib" which would happen without
the flag).
Instead, use /entry: so that the link succeeds.
No behavior change, but maybe makes the test a bit easier to understand.
https://reviews.llvm.org/D121553
Files:
lld/test/COFF/winsysroot.test
Index: lld/test/COFF/winsysroot.test
===================================================================
--- lld/test/COFF/winsysroot.test
+++ lld/test/COFF/winsysroot.test
@@ -5,12 +5,12 @@
# RUN: mkdir -p %t.dir/sysroot/VC/Tools/MSVC/1.1.1.1/lib/x64
# RUN: cp %p/Inputs/std32.lib %t.dir/sysroot/VC/Tools/MSVC/1.1.1.1/lib/x86
# RUN: cp %p/Inputs/std64.lib %t.dir/sysroot/VC/Tools/MSVC/1.1.1.1/lib/x64
-# RUN: not lld-link %t.obj /winsysroot:%t.dir/sysroot /defaultlib:std32 2>&1 | FileCheck -check-prefix=MISSINGENTRY32 --implicit-check-not=_ExitProcess %s
-MISSINGENTRY32: undefined symbol: _mainCRTStartup
+# RUN: lld-link %t.obj /winsysroot:%t.dir/sysroot \
+# RUN: /defaultlib:std32 /entry:main at 0
Check the same for a 64-bit input .obj.
-# RUN: not lld-link %p/Inputs/hello64.obj /winsysroot:%t.dir/sysroot /defaultlib:std64 2>&1 | FileCheck -check-prefix=MISSINGENTRY64 --implicit-check-not=_ExitProcess %s
-MISSINGENTRY64: undefined symbol: mainCRTStartup
+# RUN: lld-link %p/Inputs/hello64.obj /winsysroot:%t.dir/sysroot \
+# RUN: /defaultlib:std64 /entry:main
Check that when /winsysroot is specified, %LIB% is ignored.
# RUN: env LIB=foo.dir/sysroot/VC/Tools/MSVC/1.1.1.1/lib/x86 not lld-link %t.obj /winsysroot:%t.dir/doesnotexist /defaultlib:std32 2>&1 | FileCheck -check-prefix=LIBIGNORED %s
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D121553.414935.patch
Type: text/x-patch
Size: 1333 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220313/d7ba60e4/attachment.bin>
More information about the llvm-commits
mailing list