microsoft / llvm-mctoll

llvm-mctoll
Other
792 stars 123 forks source link

Cannot get step #4 to work #199

Closed briankitt closed 1 week ago

briankitt commented 2 months ago

I'm trying to get this running, but CANNOT get step 4 to work. I'm on a Windows 11 box.

I have multiple versions of VS installed, I've been a VS developer for decades. 2015, 2017, 2019, 2022. I generally always do full installs. I have numerous ASM installed, but do I have the right one? I don't know. I have a couple of C compilers installed, but do I have the right one? I don't know. Nothing is telling me how to get past these errors. The error tells me to set environment variables, but that's not working. Since that's not working, I think I maybe have the wrong ASM/C compilers installed.

Is it possible to find out what the preferred ASM/C compilers are, so I can get them installed, and the environment variables set right to get this working?

I really think there are at least 10 steps between #3 and #4 that were just skipped/assumed. Here's what I am seeing

========================================================================== cmake -S llvm -B builddir -G "Ninja" -DLLVM_TARGETS_TO_BUILD="X86;ARM" -DLLVM_ENABLE_PROJECTS="clang;lld" -DLLVM_ENABLE_ASSERTIONS=true -DCLANG_DEFAULT_PIE_ON_LINUX=OFF -DCMAKE_BUILD_TYPE=Release CMake Deprecation Warning at C:/Source/LLVM/llvm-project/cmake/Modules/CMakePolicy.cmake:6 (cmake_policy): The OLD behavior for policy CMP0114 will be removed from a future version of CMake.

The cmake-policies(7) manual explains that the OLD behaviors of all policies are deprecated and that a policy should be set to OLD only under specific short-term circumstances. Projects should be ported to the NEW behavior and not rely on setting a policy to OLD. Call Stack (most recent call first): CMakeLists.txt:6 (include)

CMake Deprecation Warning at C:/Source/LLVM/llvm-project/cmake/Modules/CMakePolicy.cmake:11 (cmake_policy): The OLD behavior for policy CMP0116 will be removed from a future version of CMake.

The cmake-policies(7) manual explains that the OLD behaviors of all policies are deprecated and that a policy should be set to OLD only under specific short-term circumstances. Projects should be ported to the NEW behavior and not rely on setting a policy to OLD. Call Stack (most recent call first): CMakeLists.txt:6 (include)

-- The C compiler identification is unknown -- The CXX compiler identification is unknown -- The ASM compiler identification is unknown -- Didn't find assembler CMake Error at CMakeLists.txt:45 (project): No CMAKE_C_COMPILER could be found.

Tell CMake where to find the compiler by setting either the environment variable "CC" or the CMake cache entry CMAKE_C_COMPILER to the full path to the compiler, or to the compiler name if it is in the PATH.

CMake Error at CMakeLists.txt:45 (project): No CMAKE_CXX_COMPILER could be found.

Tell CMake where to find the compiler by setting either the environment variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path to the compiler, or to the compiler name if it is in the PATH.

CMake Error at CMakeLists.txt:45 (project): No CMAKE_ASM_COMPILER could be found.

Tell CMake where to find the compiler by setting either the environment variable "ASM" or the CMake cache entry CMAKE_ASM_COMPILER to the full path to the compiler, or to the compiler name if it is in the PATH.

-- Warning: Did not find file Compiler/-ASM -- Configuring incomplete, errors occurred!

bharadwajy commented 2 months ago

Thanks for your interest in the project.

This project intends to raise Linux (i.e., ELF) binaries (see current status of project) and has no functionality that raises Windows (i.e., PE/COFF) binaries.

If for some reason you do wish to build it on Windows (such as to raise ELF binaries or some other), this document provides details to build LLVM on Windows. Consequently, CMake variables specified in step 4 of Linux build instructions would most likely need to be modified accordingly.