NativeJIT
NativeJIT copied to clipboard
Figure out commit hooks, clang formatting, lint, etc.
Part of this is that we should have a version of the build that runs clang's asan, msan, etc., which we're not doing now.
For clang asan, msan, etc., this link looks helpful.
The following options work (independently) to enable clang's sanitizers:
add_compile_options("-fsanitize=memory")
add_compile_options("-lubsan -fsanitize=undefined")
add_compile_options("-lasan -fsanitize=address")
add_compile_options("-ltsan -fsanitize=thread")
I'll add these at some point, but before I make that change I want to change how we add flags and define targets so that we can have a reasonable set of targets to build against. Our current setup is predicated re-running CMake to change options, which is pretty messy and also annoying enough that people probably won't run all of these things before checking in.
Those options work for NativeJIT
, but the linker stuff fails with BitFunnel
. Apparently, we're doing something different for the two projects?
When trying to build with thread sanitizer, BitFunnel
fails with
clang: error: -ltsan -fsanitize=thread: 'linker' input unused
We can't just remove ltsan
since thread sanitizer won't get linked correctly and will fail at the link stage.
We should enforce some kind of style with ClangFormat
. @MikeHopcroft , let's discuss the particulars of what will be enforced when I'm back in town.