[PATCH] D70011: lld patch for Linker Script UTF-8 BOM encoding capability

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 8 11:03:20 PST 2019


MaskRay added a comment.

In D70011#1739164 <https://reviews.llvm.org/D70011#1739164>, @cameron314 wrote:

> `ld` ignores the BOM, but still links. `lld` mistakes it for part of the next token and generates an error.
>
> A BOM is perfectly valid at the start of a UTF-8 file (though not very useful, granted). Why //not// support it? Other tools under the LLVM umbrella do, e.g. `clang`.


We need a good reason to support it, not the other way around. ld emitting warnings is a pretty clear signal that BOM is not a good idea in a linker script.


Repository:
  rLLD LLVM Linker

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D70011/new/

https://reviews.llvm.org/D70011





More information about the llvm-commits mailing list