Fix GH_001923_filesystem_long_path_support/custombuild.pl for the MSVC-internal test harness by StephanTLavavej · Pull Request #5799 · microsoft/STL (original) (raw)

In toolset update #5783 I added test coverage for <filesystem> long path support. This requires a manifest to be embedded into the executable with a special linker option. The MSVC-internal test harness uses Perl for this, and I used a single cl command. It turns out that in certain configurations (of course only run in CI checks, not in PR checks where I would have discovered this earlier), the MSVC-internal test harness adds /FastFailDump. When compiling with Clang, that gets sent to lld-link, which emits

lld-link: error: could not open '/FastFailDump': no such file or directory

I should have followed precedent and used separate compile and link commands, which avoids confusing lld-link (as in this case I believe we invoke MSVC link.exe):

Run::ExecuteCL("Test.cpp /c");
Run::ExecuteLink("/machine:$machine /out:$cwd.exe Test.obj");