[all-commits] [llvm/llvm-project] 2fa2c2: [llvm][docs] MemTagSanitizer is only supported on ...

David Spickett via All-commits all-commits at lists.llvm.org
Fri Dec 20 02:24:45 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 2fa2c2197ddbf2f06c78b6d271782a8762b13b57
      https://github.com/llvm/llvm-project/commit/2fa2c2197ddbf2f06c78b6d271782a8762b13b57
  Author: David Spickett <david.spickett at linaro.org>
  Date:   2024-12-20 (Fri, 20 Dec 2024)

  Changed paths:
    M llvm/docs/MemTagSanitizer.rst

  Log Message:
  -----------
  [llvm][docs] MemTagSanitizer is only supported on AArch64 Android (#120545)

```
$ ./bin/clang /tmp/test.c -o /tmp/test.o -target aarch64-linux -march=armv8+memtag -fsanitize=memtag-stack
clang: error: unsupported option '-fsanitize=memtag*' for target 'aarch64-unknown-linux'
```
But this works:
```
$ ./bin/clang /tmp/test.c -o /tmp/test.o --target=aarch64-linux-android -march=armv8+memtag -fsanitize=memtag-stack
```

Due to this check in Clang:

https://github.com/llvm/llvm-project/blob/2210da3b823ccf21fc634c858827c9f12c864b51/clang/lib/Driver/ToolChains/CommonArgs.cpp#L1651

Likely because the required notes and dynamic loader support only exist
for Android.

You can get around this, sort of, by not linking the file. However this
means you have to provide your own way of loading it, so it doesn't
change the statement that this feature is Android only.

https://github.com/llvm/llvm-project/issues/64692 also confirms that the
intent is to only support Android at this time.

And while I'm here, suggest an additive set of flags that can also be
used.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list