[lld] [lld] lld/ELF/Writer.cpp: write directly to outs when output is "-" (PR #72061)

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 16 23:50:05 PST 2023


MaskRay wrote:

Ah, thanks for the explanation. The description can mention `raw_ostream`:

> This lets the LLD ELF driver be used as a library with its output written to a `raw_ostream`.

`message` calls write to `stdoutOS`, so you'll need to set `disableOutput` if you use any feature that calls `message`.

I think this is still fine but we need a unittest in `lld/unittest/` (`ninja check-lld-unit`)

https://github.com/llvm/llvm-project/pull/72061


More information about the llvm-commits mailing list