Skip to content

Zephyr build fail with LLVM on Windows #32111

Closed
@yanzhouy

Description

@yanzhouy

Describe the bug
I am trying to build zephyr project in Windows with llvm compiler, but it failed.

To Reproduce
Steps to reproduce the behavior:
I installed llvm version 11.0.0 for windows and set the patch to the location.
In zephyr/samples/hello_world directory, delete all the /build content,

  1. set ZEPHYR_TOOLCHAIN_VARIANT=llvm
  2. set LLVM_TOOLCHAIN_PATH=C:\tools\windows\toolchains\llvm_11_0_0\
  3. west build -b qemu_x86 .
  4. See error: Re-running CMake. It seems to go to infinite loop and cannot build the application.

Expected behavior
Build can be done for hello-world as cross-compile with gcc i486.

Logs and console output
1
-- The C compiler identification is Clang 11.0.0
-- The CXX compiler identification is Clang 11.0.0
-- The ASM compiler identification is Clang

-- Configuring done
-- Generating done
-- Build files have been written to: /zephyr/zephyr-intel/samples/hello_world/build
[0/1] Re-running CMake...
Including boilerplate (Zephyr base (cached)):
...
[0/1] Re-running CMake...
...
[0/1] Re-running CMake...

Environment (please complete the following information):

  • OS: Windows
  • Toolchain: llvm

Additional context
Tried LLVM and Intel oneApi ICX compiler in Linux, both of them work.
Also tried with 'set ZEPHYR_TOOLCHAIN_VARIANT=cross-compile' and 'set CROSS_COMPILE=path to \ish_gcc_8_3\bin\i486-elf-' on Windows, samples/hello_world can be built successfully by 'west build -b qemu_x86 . '
How to build Zephyr project with clang or icx compiler on Windows?

Metadata

Metadata

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions