Search code examples
c++address-sanitizerpremakethread-sanitizer

Does premake support thread-sanitizer builds?


Building for thread sanitizer is a simple flag in gcc invokation:

-fsanitize=thread

Yet when looking at sanitizer support in premake I only see the options "Address" and "Fuzzer".

  • Is there an "official" way to build with thread sanitizer using premake?
  • If not, where do I have to specify my -fsanitize=thread flags?

Solution

  • There are still buildoptions/linkoptions

    so

    filter "toolset:gcc or toolset:clang"
        buildoptions{"-fsanitize=thread"}
        linkoptions{"-fsanitize=thread"}
    filter {}