[clang] [lld] [lld][ELF][clang][MTE] Add generic -z memtag-* options (PR #187055)

Elia Geretto via llvm-commits llvm-commits at lists.llvm.org
Sun Mar 22 03:53:03 PDT 2026


EliaGeretto wrote:

> I almost did not notice this patch as I am not added a reviewer. The clang change makes sense but can you extract the lld/ELF to a separate patch?
> 
> * lld: Add -z memtag-{mode,heap,stack}
> * clang: Switch -fsanitize=memtag to use -z memtag-* linker flags

Sorry, I don't think I can add reviewers directly, I think I can just tag people in comments.

Anyway, two separate commits was my original plan, but @fmayer requested them to be merged together in a single one. The reason is that the lld patch breaks backwards compatibility by removing some flags, so we would have a commit with the clang driver which is incompatible with lld. That would also probably break some of the clang tests for memtag. This reasoning makes sense to me, @MaskRay do you still want them separate?

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


More information about the llvm-commits mailing list