NativeJIT icon indicating copy to clipboard operation
NativeJIT copied to clipboard

Figure out commit hooks, clang formatting, lint, etc.

Open danluu opened this issue 8 years ago • 5 comments

danluu avatar Apr 15 '16 02:04 danluu

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.

danluu avatar Apr 18 '16 22:04 danluu

For clang asan, msan, etc., this link looks helpful.

danluu avatar Apr 22 '16 21:04 danluu

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.

danluu avatar Jun 06 '16 21:06 danluu

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.

danluu avatar Jun 06 '16 21:06 danluu

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.

danluu avatar Aug 18 '16 02:08 danluu