[PATCH] D95246: [test] Use host platform specific error message substitution in lit tests
James Henderson via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Feb 25 04:29:55 PST 2021
jhenderson added a comment.
In D95246#2587277 <https://reviews.llvm.org/D95246#2587277>, @ASDenysPetrov wrote:
> @jhenderson
>
>> Sorry, but `-W --trace` is not the same as `-Wl,--trace`. The former is a pair of options used by the compiler (one of which describes the files used by the compiler). The latter is an option passed to the linker, and is what we need. Please try again!
>
> I used `-W`, because my `c++` doesn't know `-Wl` option.
>
> C:\Users\Denis>c++ -Wl
> c++: error: unrecognized command-line option '-Wl'; did you mean '-W'?
> c++: fatal error: no input files
> compilation terminated.
>
> Could you provide exact cmd line me to use if I'm doing smth wrong?
`-Wl` on its own isn't an option. It is used as a prefix to pass an option to the linker, so the exact string you pass to the compiler is `-Wl,--trace` (no spaces, comma required). The compiler sees the `-Wl,` prefix, removes it and then passes the remainder straight to the linker. You can see examples of this in your existing commandline with things like `-Wl,--stack,16777216`.
The cmdline should be:
D:\WORK\Utilities\MSYS2\mingw64\bin\c++.exe -DGTEST_HAS_RTTI=0 -D_DEBUG -D_FILE_OFFSET_BITS=64 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Itools/llvm-ar -ID:/WORK/LLVM/llvm-project/llvm/tools/llvm-ar -Iinclude -ID:/WORK/LLVM/llvm-project/llvm/include -Wa,-mbig-obj -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-maybe-uninitialized -Wno-class-memaccess -Wno-redundant-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -O2 -fno-exceptions -fno-rtti -UNDEBUG -std=c++14 -MD -MT tools/llvm-ar/CMakeFiles/llvm-ar.dir/llvm-ar.cpp.obj -MF tools\llvm-ar\CMakeFiles\llvm-ar.dir\llvm-ar.cpp.obj.d -o tools/llvm-ar/CMakeFiles/llvm-ar.dir/llvm-ar.cpp.obj -c D:/WORK/LLVM/llvm-project/llvm/tools/llvm-ar/llvm-ar.cpp
[2/2] cmd.exe /C "cd . && D:\WORK\Utilities\MSYS2\mingw64\bin\c++.exe -Wa,-mbig-obj -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-maybe-uninitialized -Wno-class-memaccess -Wno-redundant-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -O2 -Wl,--stack,16777216 tools/llvm-ar/CMakeFiles/llvm-ar.dir/llvm-ar.cpp.obj -o bin\llvm-ar.exe -Wl,--out-implib,lib\libllvm-ar.dll.a -Wl,--major-image-version,0,--minor-image-version,0 lib/libLLVMX86AsmParser.a lib/libLLVMX86Desc.a lib/libLLVMX86Info.a lib/libLLVMBinaryFormat.a lib/libLLVMCore.a lib/libLLVMDlltoolDriver.a lib/libLLVMLibDriver.a lib/libLLVMObject.a lib/libLLVMSupport.a lib/libLLVMMCDisassembler.a lib/libLLVMMCParser.a lib/libLLVMMC.a lib/libLLVMDebugInfoCodeView.a lib/libLLVMDebugInfoMSF.a lib/libLLVMTextAPI.a lib/libLLVMOption.a lib/libLLVMBitReader.a lib/libLLVMCore.a lib/libLLVMBinaryFormat.a lib/libLLVMRemarks.a lib/libLLVMBitstreamReader.a lib/libLLVMSupport.a -lpsapi -lshell32 -lole32 -luuid -ladvapi32 D:/WORK/Utilities/MSYS2/mingw64/lib/libz.dll.a lib/libLLVMDemangle.a -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 -Wl,--trace
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D95246/new/
https://reviews.llvm.org/D95246
More information about the cfe-commits
mailing list