level-zero icon indicating copy to clipboard operation
level-zero copied to clipboard

[Question] Build instructions for Windows?

Open jjfumero opened this issue 4 years ago • 5 comments

Is there any documentation about how to build level-zero from source on Windows 10? The documentation only specifies for Linux.

jjfumero avatar May 10 '21 17:05 jjfumero

Thanks for pointing out this gap @jjfumero, the README should be updated to include instructions for building on Windows in addition to Linux.

The tested/recommended compiler is MSVC including the Spectre-mitigation libraries. CMAKE (tested with version 3.14.0-rc2) can then be used as on Linux:

mkdir build cd build cmake .. cmake --build . --config Release

Jemale avatar May 10 '21 22:05 Jemale

Thank you @Jemale . Can you expand on the configuration to be done for enabling Spectre-mitigation? I guess it is the /Qspectre option.

jjfumero avatar May 11 '21 08:05 jjfumero

That configuration is done already in https://github.com/oneapi-src/level-zero/blob/284ccb089184180e34864a9f1e23971d3d736bd8/CMakeLists.txt#L77

The required libraries should be installed with the Visual Studio installer. Under the 'Compilers' section in the 'Individual Components' tab it should look something like this:

image

and under the 'SDKs' section:

image

Jemale avatar May 11 '21 13:05 Jemale

Thank you @Jemale. It worked. I had to install the missing packages for the Spectre mitigation.

If you think it is useful, I can open a PR with the documentation for the windows build.

jjfumero avatar May 11 '21 13:05 jjfumero

@jjfumero Yes, feel free to do that :)

Jemale avatar May 11 '21 13:05 Jemale