<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Test passes on windows with a ninja build but not a Visual Studio build"
   href="https://bugs.llvm.org/show_bug.cgi?id=51072">51072</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Test passes on windows with a ninja build but not a Visual Studio build
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>Test Suite
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Windows NT
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>lit
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>orlando.hyams@sony.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>daniel@zuster.org, llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Git revision: main 0da3573a9ef9 (12th July 2021)

The test:
clang/test/utils/update_cc_test_checks/check-globals.test

This test passes on windows when run from a ninja build directory, but not from
a Visual Studio (2017) one. For the Visual Studio build I get this failure:

```
# command stderr:
lit.py: D:\dev\opensource-build-clang\tools\clang\test\lit.site.cfg.py:56:
fatal: unable to find 'build_mode' parameter, use '--param=build_mode=VALUE'
```

Repro steps:
1. Generate build
<span class="quote">> cmake <path-to-llvm> -G "Visual Studio 15 2017" -A x64 -Thost=x64 -DLLVM_PARALLEL_LINK_JOBS=1  -DLLVM_ENABLE_PROJECTS="clang" -DLLVM_ENABLE_ASSERTIONS=TRUE</span >

2. Build
3. Run test
<span class="quote">> python Release\bin\llvm-lit.py <path-to-llvm>/clang/test/utils/update_cc_test_checks/check-globals.test  -v</span >
<snip>
# command stderr:
lit.py: D:\dev\opensource-build-clang\tools\clang\test\lit.site.cfg.py:56:
fatal: unable to find 'build_mode' parameter, use '--param=build_mode=VALUE'

error: command failed with exit status: 2

--

********************
********************
Failed Tests (1):
  Clang :: utils/update_cc_test_checks/check-globals.test

If I build with ninja instead there is no issue:

1. Generate build
In a "x64 Native Tools Command Prompt for VS 2017" console:
<span class="quote">> cmake <path-to-llvm> -G Ninja -DLLVM_PARALLEL_LINK_JOBS=1  -DLLVM_ENABLE_PROJECTS="clang" -DLLVM_ENABLE_ASSERTIONS=TRUE -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER=cl.exe -DCMAKE_C_COMPILER=cl.exe -DCMAKE_ASM_COMPILER=cl.exe -DCMAKE_LINKER=link.exe</span >

2. Build
3. Run test
<span class="quote">>python bin\llvm-lit.py <patht-to-llvm>/clang/test/utils/update_cc_test_checks/check-globals.test -v</span >
<snip>
-- Testing: 1 tests, 1 workers --
PASS: Clang :: utils/update_cc_test_checks/check-globals.test (1 of 1)

Testing Time: 3.09s
  Passed: 1</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>