<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Hello Jerry,<br>
<br>
Yes, the OpenBlas community's answer is correct. The flang that is packaged along with llvm is llvm/flang. The codegen is not yet available and currently, llvm/flang uses an external compiler to do codegen.</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
flang-new.exe is the new driver which is designed like clang. You have to use <code>
fc1</code>​ in place of <code>cc1</code>​.</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
f18.exe is a temporary driver that has been replaced with flang-new.exe. f18.exe does not accept
<code>cc1</code>​ or <code>fc1</code>​ options. You can probably use the help option to find the appropriate flags.</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
--Kiran</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> flang-dev <flang-dev-bounces@lists.llvm.org> on behalf of Jerry J via flang-dev <flang-dev@lists.llvm.org><br>
<b>Sent:</b> 09 January 2022 13:33<br>
<b>To:</b> flang-dev@lists.llvm.org <flang-dev@lists.llvm.org><br>
<b>Subject:</b> [flang-dev] Does LLVM/Flang support compile LAPACK now on windows?</font>
<div> </div>
</div>
<div>
<div dir="ltr">
<p style="box-sizing:border-box; margin-bottom:16px; color:rgb(36,41,47); font-size:14px; margin-top:0px">
<b>Hi Flang-Dev</b></p>
<p style="box-sizing:border-box; margin-bottom:16px; color:rgb(36,41,47); font-size:14px; margin-top:0px">
<b>we try to compile openblas on windows ,we use CLang64 Flang to compile but it failed when compile LAPACK of OpenBlas. I have asked help from Openblas communtity, and as they said:</b></p>
<p style="box-sizing:border-box; margin-bottom:16px; font-size:14px; margin-top:0px">
<font color="#24292f">There are two different Flang: LLVM/Flang and Classic Flang.</font><br style="box-sizing:border-box">
<font color="#ff0000">The one packaged on MSYS2/clang64 is the LLVM one. which couldn't generate binary code and is also not supported by CMake</font><span style="color:rgb(36,41,47)">.<br style="box-sizing:border-box">
MSYS2/mingw-w64 doesn't have Classic Flang</span></p>
<p style="box-sizing:border-box; margin-bottom:16px; color:rgb(36,41,47); font-size:14px; margin-top:0px">
so I want to make sure whether their answer is correct? thansk a lot!</p>
<p dir="auto" style="box-sizing:border-box; margin-bottom:16px; color:rgb(36,41,47); font-size:14px; margin-top:0px">
<span style="box-sizing:border-box; font-weight:600">it seems flang-new.exe lack cc1 tool, so I use f18,but it still failed</span><br style="box-sizing:border-box">
C:\msys64\clang64\bin>flang-new.exe -cc1<br style="box-sizing:border-box">
error: unknown integrated tool '-cc1'. Valid tools include '-fc1'.</p>
<p dir="auto" style="box-sizing:border-box; margin-top:0px; margin-bottom:16px; color:rgb(36,41,47); font-size:14px">
C:\msys64\clang64\bin>f18.exe -cc1<br style="box-sizing:border-box">
Enter Fortran source<br style="box-sizing:border-box">
Use EOF character (^D) to end file</p>
<p dir="auto" style="box-sizing:border-box; margin-top:0px; margin-bottom:16px; color:rgb(36,41,47); font-size:14px">
<b>Compile failure info:</b><br style="box-sizing:border-box">
-- The Fortran compiler identification is unknown<br style="box-sizing:border-box">
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/lib/../lib/libmingw32.a(lib64_libmingw32_a-crt0_c.o): in function <code style="box-sizing:border-box; font-family:ui-monospace,SFMono-Regular,"SF Mono",Menlo,Consolas,"Liberation Mono",monospace; font-size:12px; padding:0.2em 0.4em; margin:0px; border-radius:6px">main':
 C:/_/M/mingw-w64-crt-git/src/mingw-w64/mingw-w64-crt/crt/crt0_c.c:18: undefined reference to </code>WinMain'<br style="box-sizing:border-box">
collect2.exe: error: ld returned 1 exit status<br style="box-sizing:border-box">
execvp(gfortran) failed:<br style="box-sizing:border-box">
-- Detecting Fortran compiler ABI info<br style="box-sizing:border-box">
CMake Error: Error required internal CMake variable not set, cmake may not be built correctly.<br style="box-sizing:border-box">
Missing variable is:<br style="box-sizing:border-box">
CMAKE_Fortran_PREPROCESS_SOURCE</p>
</div>
</div>
</body>
</html>