Hello LLVM community, I find myself in need of your help. I’m not an experienced LLVM user, I just started getting my hands on this huge and impressive project as part of my studies. As you might have guessed, the issues I ran into have been many but I managed on my own up until now. Well, now I have indeed encountered a problem for which I have run out of possible solutions and google searches. Here it comes:
I’m interested in using the MemTagSanitizer feature of clang. This feature, which is only available when targeting a specific architecture (
-target aarch64-linux -march=armv8+memtag), enables a few backend passes that instrument the code with a hardware-based version of the Address Sanitiser. These passes can be enabled by using the
-fsanitize=memtag option when invoking clang.
Unfortunately, albeit this feature works when using the repository version of clang (e.g. clang 10 that comes with ubuntu), it does not work when using a freshly compiled version of clang. I’ve tried to build it in various manner but I never managed to get a clang with that working feature.
Here’s my latest build configuration: ‘cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_PROJECTS=“clang;clang-tools-extra;lld;lldb;openmp;polly;pstl;compiler-rt” -DLLVM_TARGETS_TO_BUILD=“AArch64”
As you can see, I’ve enabled almost all of the projects in the hope they influence the final clang, unfortunately with no luck.
I realise that this memtag feature is probably seldom used and I would not be surprised if only few of you have ever heard of it, but you might still know if there exists some way to enable secondary or experimental features for clang.
I really appreciate any help, thank you!