[cfe-dev] Clang build on windows

ghalib exaleap via cfe-dev cfe-dev at lists.llvm.org
Wed Oct 30 22:16:51 PDT 2019


Hi,

     To build clang on windows i have gone through the following step's,
Try-1 on a windows machine
------------------------------------
Followed step's from http://clang.llvm.org/get_started.html ----->
Using Visual Studio
1. Downloaded Git https://git-scm.com/download
2. *CMake *https://cmake.org/download/
3. *Visual Studio 2017 *
4. *Python *https://www.python.org/download/
5. *GnuWin32 tools *http://sourceforge.net/projects/getgnuwin32/files/
6. Cloned git clone https://github.com/llvm/llvm-project.git
7. mkdir build && cd build
8. cmake -DLLVM_ENABLE_PROJECTS=clang -G "Visual Studio 15 2017" -A x64
-Thost=x64 ../llvm
*** Build was successful but, Am not getting what happen I searched each
and ervery folder their i haven't found clang executables.

*** You can find the build log & folder structure in the attachment.

-----------------------------------------------------------------------------------
Try-2 on a windows machine
------------------------------------
steps:
1. Download MSYS2
2. pacman -S cmake
3. Run
$ cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE="Release"
-DBUILD_SHARED_LIBS=True -DLLVM_USE_SPLIT_DWARF=True
-DCMAKE_INSTALL_PREFIX="\Users\Dell\llvm-project\khan\install"
-DLLVM_OPTIMIZED_TABLEGEN=True -DLLVM_BUILD_TESTS=False
-DDEFAULT_SYSROOT="\Users\Dell\llvm-project\khan\install\sysroot"
-DLLVM_DEFAULT_TARGET_TRIPLE="x86_64-w64-mingw32"
-DLLVM_TARGETS_TO_BUILD="" -DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD="RISCV"
../llvm

(Or)
  DLLVM_DEFAULT_TARGET_TRIPLE="riscv64-unknown-linux-gnu"

Getting an Error:
-----------------------
CMake Error at CMakeLists.txt:53 (project):
  Generator

    Unix Makefiles

  does not support platform specification, but platform

    64

  was specified.


-- Configuring incomplete, errors occurred!
See also "/home/Dell/llvm-project/build/CMakeFiles/CMakeOutput.log".
------------------------------------------------------------------------------------------------------------------------------

  *** Can anyone please help me to get clang Windows Executable.

 Thanks
Ghalib khan.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20191031/46ff1a74/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: build.log
Type: application/octet-stream
Size: 13694 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20191031/46ff1a74/attachment.obj>


More information about the cfe-dev mailing list