[flang-dev] Building Flang on Windows

Ivan Zhechev via flang-dev flang-dev at lists.llvm.org
Thu Jul 29 00:55:05 PDT 2021


I have ported the first script "test_symbols.sh". This is available for review in https://reviews.llvm.org/D107041. Please have a look.

Thanks,
Ivan

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

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<mailto:Kiran.Chandramohan at arm.com>>
Sent: Tuesday, July 20, 2021 11:28
To: flang-dev at lists.llvm.org<mailto:flang-dev at lists.llvm.org> <flang-dev at lists.llvm.org<mailto:flang-dev at lists.llvm.org>>
Cc: Kruse, Michael <michael.kruse at anl.gov<mailto:michael.kruse at anl.gov>>; Ivan Zhechev <Ivan.Zhechev at arm.com<mailto: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/20210729/5da9b391/attachment.html>


More information about the flang-dev mailing list