Clang fails to link in LIT test scripts for x64 windows premerge checks

Hi, I’m currently working on an improvement for llvm-cov. The coding part is now complete and I want to add new regression tests for the newly added code. In the test, I’m using clang to compile a simple multiple-source program with profile and coverage mapping enabled:

// RUN: mkdir -p %t && clang -fprofile-instr-generate=%t/default.profraw -fcoverage-mapping -o %t/main.out \
// RUN:   %S/Inputs/directory_coverage/ \
// RUN:   %S/Inputs/directory_coverage/a0/a1/ \
// RUN:   %S/Inputs/directory_coverage/b/ \
// RUN:   %S/Inputs/directory_coverage/b/ \
// RUN:   %S/Inputs/directory_coverage/c0/c1/ \
// RUN:   %S/Inputs/directory_coverage/c0/c1/

However, after committing to Phabricator, the code mentioned above fails for x64 windows premerge checks:

# command output:
LINK : fatal error LNK1181: cannot open input file 'c:\ws\w3\llvm-project\premerge-checks\build\lib\clang\17\lib\windows\clang_rt.profile-x86_64.lib'
# command stderr:
clang: error: linker command failed with exit code 1181 (use -v to see invocation)
error: command failed with exit status: 0x49d

It seems that the x64 windows test envirionmet is missing a critical library. I have no idea what causes the issue and how to fix it.

If nobody can help me, then I’ll have no choice but to disable the test on x64 Windows for the time being.

Please, anyone, help me! :sob:

I responded directly on your change with more details, but this is an issue with your test, we cannot assume that Clang or compiler-rt runtimes are available from LLVM tests.