oneapi-src / oneapi-src/level-zero

Error building with clang-cl on Windows

Open
#83 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
335
Forks
140
Avg merge
12h 32m
Merged PRs (30d)
5

Description

The following errors occur when trying to set clang-cl.exe instead of cl.exe as host compiler:

[1/39] Building CXX object source\CMakeFiles\ze_loader.dir\lib\ze_libapi.cpp.obj
FAILED: source/CMakeFiles/ze_loader.dir/lib/ze_libapi.cpp.obj 
C:\PROGRA~1\LLVM\bin\clang-cl.exe  /nologo -TP -DL0_LOADER_VERSION=\"1\" -DL0_VALIDATION_LAYER_SUPPORTED_VERSION=\"1\" -Dze_loader_EXPORTS -ID:\a\llvm\llvm\build\tools\sycl\plugins\level_zero\level_zero\level_zero_loader\include -ID:\a\llvm\llvm\build\tools\sycl\plugins\level_zero\level_zero\level_zero_loader\source\wrapper\include -ID:\a\llvm\llvm\build\tools\sycl\plugins\level_zero\level_zero\level_zero_loader -ID:\a\llvm\llvm\build\tools\sycl\plugins\level_zero\level_zero\level_zero_loader\source\inc /DWIN32 /D_WINDOWS /W3 /GR /EHsc /guard:cf /Qspectre /WX /W3 /wd4996 /MP /MT /O2 /Ob2 /DNDEBUG /Zi -std:c++14 /showIncludes /Fosource\CMakeFiles\ze_loader.dir\lib\ze_libapi.cpp.obj /Fdsource\CMakeFiles\ze_loader.dir\ -c -- D:\a\llvm\llvm\build\tools\sycl\plugins\level_zero\level_zero\level_zero_loader\source\lib\ze_libapi.cpp
clang-cl: error: argument unused during compilation: '/Qspectre' [-Werror,-Wunused-command-line-argument]
clang-cl: error: argument unused during compilation: '/MP' [-Werror,-Wunused-command-line-argument]
[2/39] Building CXX object source\CMakeFiles\ze_loader.dir\lib\zet_libapi.cpp.obj
FAILED: source/CMakeFiles/ze_loader.dir/lib/zet_libapi.cpp.obj 
C:\PROGRA~1\LLVM\bin\clang-cl.exe  /nologo -TP -DL0_LOADER_VERSION=\"1\" -DL0_VALIDATION_LAYER_SUPPORTED_VERSION=\"1\" -Dze_loader_EXPORTS -ID:\a\llvm\llvm\build\tools\sycl\plugins\level_zero\level_zero\level_zero_loader\include -ID:\a\llvm\llvm\build\tools\sycl\plugins\level_zero\level_zero\level_zero_loader\source\wrapper\include -ID:\a\llvm\llvm\build\tools\sycl\plugins\level_zero\level_zero\level_zero_loader -ID:\a\llvm\llvm\build\tools\sycl\plugins\level_zero\level_zero\level_zero_loader\source\inc /DWIN32 /D_WINDOWS /W3 /GR /EHsc /guard:cf /Qspectre /WX /W3 /wd4996 /MP /MT /O2 /Ob2 /DNDEBUG /Zi -std:c++14 /showIncludes /Fosource\CMakeFiles\ze_loader.dir\lib\zet_libapi.cpp.obj /Fdsource\CMakeFiles\ze_loader.dir\ -c -- D:\a\llvm\llvm\build\tools\sycl\plugins\level_zero\level_zero\level_zero_loader\source\lib\zet_libapi.cpp
clang-cl: error: argument unused during compilation: '/Qspectre' [-Werror,-Wunused-command-line-argument]
clang-cl: error: argument unused during compilation: '/MP' [-Werror,-Wunused-command-line-argument]
[3/39] Building RC object source\CMakeFiles\ze_loader.dir\ZeLoaderVersion.rc.res
Microsoft (R) Windows (R) Resource Compiler Version 10.0.10011.16384


Copyright (C) Microsoft Corporation.  All rights reserved.

ninja: build stopped: subcommand failed.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the Windows build of the Level Zero loader with clang-cl.exe and inspect the compiler flags shown in the failure, especially /Qspectre and /MP. The work is done when the affected loader sources compile successfully with clang-cl without unused-argument errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake, cpp
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.