[PATCH] D33302: Don't output a PDB unless /DEBUG is specified
Zachary Turner via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed May 17 16:07:38 PDT 2017
zturner added a comment.
Yes, MSVC ignores `/pdb` option if you don't pass `/DEBUG`.
D:\src\llvmbuild\pdbtest>cl /c /Z7 hello.cpp
Microsoft (R) C/C++ Optimizing Compiler Version 19.10.25019 for x86
Copyright (C) Microsoft Corporation. All rights reserved.
hello.cpp
C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.10.25017\include\xlocale(314): warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc
C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.10.25017\include\exception(366): warning C4577: 'noexcept' used with no exception handling mode specified; termination on exception is not guaranteed. Specify /EHsc
D:\src\llvmbuild\pdbtest>link /out:hello.exe /pdb:hello.pdb hello.obj
Microsoft (R) Incremental Linker Version 14.10.25019.0
Copyright (C) Microsoft Corporation. All rights reserved.
D:\src\llvmbuild\pdbtest>dir hello*
Volume in drive D is New Volume
Volume Serial Number is 2EC5-6F01
Directory of D:\src\llvmbuild\pdbtest
05/17/2017 04:05 PM 92 hello.cpp
05/17/2017 04:06 PM 183,296 hello.exe
05/17/2017 04:05 PM 334,693 hello.obj
3 File(s) 518,081 bytes
0 Dir(s) 129,495,351,296 bytes free
D:\src\llvmbuild\pdbtest>link /debug /out:hello.exe /pdb:hello.pdb hello.obj
Microsoft (R) Incremental Linker Version 14.10.25019.0
Copyright (C) Microsoft Corporation. All rights reserved.
D:\src\llvmbuild\pdbtest>dir hello*
Volume in drive D is New Volume
Volume Serial Number is 2EC5-6F01
Directory of D:\src\llvmbuild\pdbtest
05/17/2017 04:05 PM 92 hello.cpp
05/17/2017 04:06 PM 756,224 hello.exe
05/17/2017 04:06 PM 3,284,272 hello.ilk
05/17/2017 04:05 PM 334,693 hello.obj
05/17/2017 04:06 PM 8,048,640 hello.pdb
5 File(s) 12,423,921 bytes
0 Dir(s) 129,483,444,224 bytes free
https://reviews.llvm.org/D33302
More information about the llvm-commits
mailing list