[flang-dev] Building Flang on Windows

Kruse, Michael via flang-dev flang-dev at lists.llvm.org
Tue Jul 20 13:06:33 PDT 2021


If you prefer to not set up a Windows bot, you can also upload the patch to Phabricator (without reviewers added), the pre-merge bot will test the Windows flang build as well. Generally, when the python works on Linux, there are not that many differences on Windows. The main thing are the paths, which should not be a problem if using Python's functions to manipulate paths.

For building on Windows yourself, you need the following things. I am using Chocolatey, so here are the packages you would need:

choco install -y cmake ninja python3 visualstudio2019community git

My command line is (execute in the "x64 Native Tools Command Prompt For VS 2019" found in the start menu):

$ cmake -GNinja  C:\Users\meinersbur\src\llvm-project\llvm -GNinja -DLLVM_ENABLE_PROJECTS=clang;mlir;flang -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=cl -DCMAKE_CXX_COMPILER=cl  -DLLVM_ENABLE_ASSERTIONS=ON -DCMAKE_INSTALL_PREFIX=C:\Users\meinersbur\install\llvm-project\release -DLLVM_LIT_ARGS=-svj4

$ ninja check-flang -j4

Alternatively, use the cmake gui.


Michael


________________________________
From: Kiran Chandramohan <Kiran.Chandramohan at arm.com>
Sent: Tuesday, July 20, 2021 11:28
To: flang-dev at lists.llvm.org <flang-dev at lists.llvm.org>
Cc: Kruse, Michael <michael.kruse at anl.gov>; Ivan Zhechev <Ivan.Zhechev at arm.com>
Subject: Building Flang on Windows

Hello Michael,

Ivan (email in CC) is working on porting the shell scripts (used for testing Flang) to Python. He has already ported one of the scripts and would like to test it on Windows. What is the best way to do this? And could you provide build instructions for building Flang on Windows?

Thanks,
Kiran
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/flang-dev/attachments/20210720/5ef44c4c/attachment.html>


More information about the flang-dev mailing list