Skip to content

Add SCREAMING-case symlinks for the debug CRT libs#176

Open
RyanJamesStewart wants to merge 1 commit into
Jake-Shadle:mainfrom
RyanJamesStewart:fix/debug-crt-screaming-symlink
Open

Add SCREAMING-case symlinks for the debug CRT libs#176
RyanJamesStewart wants to merge 1 commit into
Jake-Shadle:mainfrom
RyanJamesStewart:fix/debug-crt-screaming-symlink

Conversation

@RyanJamesStewart
Copy link
Copy Markdown

xwin splat --include-debug-libs doesn't create the uppercase symlinks for the debug CRT libraries, so a case-sensitive linker fails to find them.

src/splat.rs curates the SCREAMING-case aliases for the CRT libs referenced via uppercase /DEFAULTLIB directives (libcmt -> LIBCMT.lib, msvcrt -> MSVCRT.lib, oldnames -> OLDNAMES.lib). This covers the release runtimes (/MT, /MD) but not their debug twins: under /MTd the static debug CRT is libcmtd.lib, under /MDd the dynamic debug CRT is msvcrtd.lib. Both miss every arm and get no alias, so on a case-sensitive filesystem lld-link cannot open LIBCMTD.lib (#166).

This adds the two debug-variant arms (oldnames has no debug variant). The match is pulled into a small angry_crt_alias function so it can carry a regression test, since no existing test sets include_debug_libs.

cargo fmt --all -- --check, cargo clippy --lib, and the new test all pass.

Fixes #166.

xwin splat --include-debug-libs did not create the uppercase
symlinks for libcmtd/msvcrtd, so a case-sensitive linker fails
to open LIBCMTD.lib under /MTd or MSVCRTD.lib under /MDd.

Extract the curated alias match into angry_crt_alias so it can
carry a regression test, and add the two debug-variant arms.

Fixes Jake-Shadle#166
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Missing symlink for LIBCMTD.lib -> libcmtd.lib

1 participant