Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
correctly pass linker options to MSVC
Previously running found.t in debug mode would see results like: C:\Users\tony\dev\devel-checklib\git\devel-checklib>perl -Mblib t\found.t 1..8 ok 1 - lib => 'msvcrt' W3 -Od -MD -Zi -DDEBUGGING -DWIN32 -D_CONSOLE -DNO_STRICT -D_CRT_SECURE_NO_DEPRE CATE -D_CRT_NONSTDC_NO_DEPRECATE -DPERL_TEXTMODE_SCRIPTS -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -nologo -nodefaultlib -debug -libpath:"c:\perl -5.14.1\lib\CORE" -machine:x86 "/manifestdependency:type='Win32' name='Microsoft .Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyT oken='6595b64144ccf1df' language='*'" assertlib2s91hAMm.c msvcrt.lib /Feassertli bJY5x26JC.exe /link cl : Command line warning D9002 : ignoring unknown option '-nodefaultlib' cl : Command line warning D9002 : ignoring unknown option '-debug' cl : Command line warning D9002 : ignoring unknown option '-libpath:c:\perl-5.14 .1\lib\CORE' cl : Command line warning D9002 : ignoring unknown option '-machine:x86' cl : Command line warning D9002 : ignoring unknown option '/manifestdependency:t ype='Win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processor Architecture='*' publicKeyToken='6595b64144ccf1df' language='*'' assertlib2s91hAMm.c ok 2 - ... and check_lib is true ok 3 - lib => 'kernel32' W3 -Od -MD -Zi -DDEBUGGING -DWIN32 -D_CONSOLE -DNO_STRICT -D_CRT_SECURE_NO_DEPRE CATE -D_CRT_NONSTDC_NO_DEPRECATE -DPERL_TEXTMODE_SCRIPTS -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -nologo -nodefaultlib -debug -libpath:"c:\perl -5.14.1\lib\CORE" -machine:x86 "/manifestdependency:type='Win32' name='Microsoft .Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyT oken='6595b64144ccf1df' language='*'" assertlibIVQZIq2L.c kernel32.lib /Feassert libJRvNb0Xb.exe /link cl : Command line warning D9002 : ignoring unknown option '-nodefaultlib' cl : Command line warning D9002 : ignoring unknown option '-debug' cl : Command line warning D9002 : ignoring unknown option '-libpath:c:\perl-5.14 .1\lib\CORE' cl : Command line warning D9002 : ignoring unknown option '-machine:x86' cl : Command line warning D9002 : ignoring unknown option '/manifestdependency:t ype='Win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processor Architecture='*' publicKeyToken='6595b64144ccf1df' language='*'' assertlibIVQZIq2L.c ok 4 - ... and check_lib is true with the change: C:\Users\tony\dev\devel-checklib\git\devel-checklib>perl -Mblib t\found.t 1..8 ok 1 - lib => 'msvcrt' W3 -Od -MD -Zi -DDEBUGGING -DWIN32 -D_CONSOLE -DNO_STRICT -D_CRT_SECURE_NO_DEPRE CATE -D_CRT_NONSTDC_NO_DEPRECATE -DPERL_TEXTMODE_SCRIPTS -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO assertlibi36Qev0i.c msvcrt.lib /FeassertlibP5S ac4Lk.exe /link -nologo -nodefaultlib -debug -libpath:"c:\perl-5.14.1\lib\CORE" -machine:x86 "/manifestdependency:type='Win32' name='Microsoft.Windows.Common-Co ntrols' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144cc f1df' language='*'" oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib netapi32.lib uuid.l ib ws2_32.lib mpr.lib winmm.lib version.lib odbc32.lib odbccp32.lib comctl32.lib msvcrt.lib assertlibi36Qev0i.c ok 2 - ... and check_lib is true ok 3 - lib => 'kernel32' W3 -Od -MD -Zi -DDEBUGGING -DWIN32 -D_CONSOLE -DNO_STRICT -D_CRT_SECURE_NO_DEPRE CATE -D_CRT_NONSTDC_NO_DEPRECATE -DPERL_TEXTMODE_SCRIPTS -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO assertlibPEMVsg9l.c kernel32.lib /FeassertlibN LOJ8CLr.exe /link -nologo -nodefaultlib -debug -libpath:"c:\perl-5.14.1\lib\CORE " -machine:x86 "/manifestdependency:type='Win32' name='Microsoft.Windows.Common- Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144 ccf1df' language='*'" oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.li b comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib netapi32.lib uuid .lib ws2_32.lib mpr.lib winmm.lib version.lib odbc32.lib odbccp32.lib comctl32.l ib msvcrt.lib assertlibPEMVsg9l.c ok 4 - ... and check_lib is true The libraries are needed since -nodefaultlib skips linking the C runtime, and $Config{perllibs} includes the C runtime.
- Loading branch information