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".


Solution

  • There are still buildoptions/linkoptions

    so

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