Files
clang-p2996/compiler-rt/test/asan/TestCases/Windows/delay_dbghelp.cpp
Martin Storsjö c2717a89b8 [compiler-rt] [test] Remove an unintended grep parameter
This parameter seems unintentional here; we're trying to grep
the input on stdin, from the earlier stage in the pipeline.

Since a recent update on Github Actions runners, the previous
form (grepping a file, while piping in data on stdin) would fail
running the test, with the test runner Python script throwing
an exception when evaluating it:

      File "D:\a\llvm-mingw\llvm-mingw\llvm-project\llvm\utils\lit\lit\TestRunner.py", line 935, in _executeShCmd
        out = procs[i].stdout.read()
              ^^^^^^^^^^^^^^^^^^^^^^
      File "C:\hostedtoolcache\windows\Python\3.12.7\x64\Lib\encodings\cp1252.py", line 23, in decode
        return codecs.charmap_decode(input,self.errors,decoding_table)[0]
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    TypeError: a bytes-like object is required, not 'NoneType'
2024-10-20 22:56:41 +03:00

19 lines
642 B
C++

// Build an executable with ASan, then extract the DLLs that it depends on.
// RUN: %clang_cl_asan %s %Fe%t.exe
// RUN: llvm-readobj --coff-imports %t.exe | grep Name: | sed -e 's/ *Name: *//' > %t
//
// Make sure the binary doesn't depend on dbghelp directly.
// RUN: not grep dbghelp.dll %t
//
// Make sure any clang_rt DLLs it depends on don't depend on dbghelp. In the
// static build, there won't be any clang_rt DLLs.
// RUN: not grep cl""ang_rt %t || \
// RUN: grep cl""ang_rt %t | xargs which | \
// RUN: xargs llvm-readobj --coff-imports | not grep dbghelp.dll
extern "C" int puts(const char *);
int main() {
puts("main");
}