<div dir="auto">In fact... I've just uploaded the follow-up commits to Phabricator that switch llvm-ml to use Option.h and put basic command-line compatibility in place. A lot of options aren't supported just yet - including that llvm-ml doesn't include dispatch to a linker, so it will only work for /c builds.<div dir="auto"><br></div><div dir="auto">The top of the current chain is here: <a href="https://reviews.llvm.org/D90061">https://reviews.llvm.org/D90061</a><br><div dir="auto"><br></div><div dir="auto">Other contributions are welcome!</div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Oct 23, 2020, 3:42 PM Nico Weber <<a href="mailto:thakis@chromium.org">thakis@chromium.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div dir="ltr">On Fri, Oct 23, 2020 at 3:24 PM Martin Storsjö <<a href="mailto:martin@martin.st" target="_blank" rel="noreferrer">martin@martin.st</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi,<br>
<br>
On Fri, 23 Oct 2020, Eric Astor via llvm-dev wrote:<br>
<br>
> Just a quick update on the llvm-ml project. As a refresher, this was a<br>
> proposal to add native [MASM][1] support to LLVM's assembly capabilities, as<br>
> part of supporting cross-platform Windows compilation.<br>
> <br>
> [1]: <a href="https://docs.microsoft.com/en-us/cpp/assembler/masm/microsoft-macro-as" rel="noreferrer noreferrer" target="_blank">https://docs.microsoft.com/en-us/cpp/assembler/masm/microsoft-macro-as</a><br>
> sembler-reference?view=vs-2019<br>
> <br>
> A large set of directives are now supported, with a growing suite of tests.<br>
> After the next outstanding chain of commits ([tip][2]) adds macro procedures<br>
> and macro functions (including local symbols), this will include most of the<br>
> headline features for the language. (STRUCTs have been in place for some<br>
> time now, including type inference for size-checking.) Features not yet in<br>
> place include:<br>
> * RECORDs,<br>
> * ASSUME,<br>
> * the ALIGN/ORG/EVEN directives,<br>
> * the GOTO directive (within macros),<br>
> * anonymous labels, and<br>
> * built-in macros (and the string-manipulation directives).<br>
> [2]: <a href="https://reviews.llvm.org/D89741" rel="noreferrer noreferrer" target="_blank">https://reviews.llvm.org/D89741</a><br>
> <br>
> Anyone else interested in reviewing some of the commits around this project?<br>
<br>
I just recently got an interest in this project, when I tried building the <br>
OpenMP runtimes for windows - and they contain one source file in MASM <br>
format.<br>
<br>
>From very brief attempts at assembling the source file [1] with llvm-ml <br>
noticed that it lacked some sort of preprocessing that the source used, <br>
among a few other issues.<br>
<br>
CMake also ends up adding a few parameters using forward slashes, while it <br>
seems like llvm-ml currently only accepts parameters with dashes. Handling <br>
both (like clang-cl and lld/COFF do, among others) probably would require <br>
rewriting the option handling using the llvm/Option framework, like those <br>
tools do.<br></blockquote><div><br></div><div>Yes, this is a known TODO :)</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
An example command for building it looks like this (in <br>
llvm-project/openmp/build):<br>
<br>
<tool> -Domp_EXPORTS -Iruntime/src -I../runtime/src -I../runtime/src/i18n <br>
-I../runtime/src/include -I../runtime/src/thirdparty/ittnotify -D <br>
_CRT_SECURE_NO_WARNINGS -D _CRT_SECURE_NO_DEPRECATE -D _WINDOWS -D _WINNT <br>
-D _WIN32_WINNT=0x0501 -D _USRDLL -win64 -D_M_AMD64 -DOMPT_SUPPORT=0 /c <br>
/Fo runtime/src/CMakeFiles/omp.dir/z_Windows_NT-586_asm.asm.obj <br>
../runtime/src/z_Windows_NT-586_asm.asm<br>
<br>
When building for i386, you'd also see the parameters "/coff" and <br>
"/safeseh" added on the command line [2].<br>
<br>
[1] <a href="https://github.com/llvm/llvm-project/blob/master/openmp/runtime/src/z_Windows_NT-586_asm.asm" rel="noreferrer noreferrer" target="_blank">https://github.com/llvm/llvm-project/blob/master/openmp/runtime/src/z_Windows_NT-586_asm.asm</a><br>
<br>
[2] <a href="https://github.com/llvm/llvm-project/blob/master/openmp/runtime/cmake/LibompHandleFlags.cmake#L74-L82" rel="noreferrer noreferrer" target="_blank">https://github.com/llvm/llvm-project/blob/master/openmp/runtime/cmake/LibompHandleFlags.cmake#L74-L82</a><br>
<br>
// Martin<br>
</blockquote></div></div>
</blockquote></div>