Hi,
First of all, I'd really like to thank eli-schwartz for the support they gave in my previous issue. I wasn't able to thank them properly because the thread got closed before I had a chance to reply.
In that thread I was encouraged to ask questions about Meson codebase's inner workings, as there are no docs for them. I'm trying to add support for a new toolchain, and I've gotten most things to work. There are a few things I am currently stuck on:
1. When linking a static library target to an executable, Meson encloses the argument needed to link the library within single quotes (in my case this is just the path to the .a file, no -l needed). Unfortunately, my linker chokes on them. If I manually edit the generated build.ninja and remove the quotes, the link occurs successfully. This only happens with the library argument, all other link args end up unquoted. Is this behavior compiler-specific, or (as I suspect), a general Meson thing?
2. From what I understood, Meson supports compiling assembly pretty much only through the compiler's front-end (I know about generators, but they are more of a workaround than a solution, as they make build files toolchain-specific since you have to hardcode arguments and whatnot).
But, you guessed it, the compiler I'm working with isn't able to do that. I have to find a way to tell Meson to invoke the assembler directly. How should I go about it? Is this even possible right now, or should I wait for/contribute to proper asm support? I see that there is limited support for assemblers (MASM, NASM and YASM), but those seem to be edge cases.
3. This is low priority, but Meson seems to generate thin archives by default if the static linker supports doing so. My toolchain's linker, which normally works as both the dynamic and static linker, can link GNU ar libraries; however, it does not support thin archives. Is there a way to tell Meson to generate normal archives? I couldn't find anything in the documentation.