Linux: can we compile with -DLLVM_ENABLE_ASSERTIONS=ON

Created on 9 Jul 2019  路  5Comments  路  Source: ClangBuiltLinux/linux

clang releases are typically produced with the cmake option -DCMAKE_BUILD_TYPE=Release because debug builds are too slow. -DLLVM_ENABLE_ASSERTIONS=ON is a happy medium; a release optimized build but with LLVM_ASSERTs kept on. We should see if we fail any assertions for some allyesoonfig builds.

question

Most helpful comment

That's great to hear, thanks too for the stats!

All 5 comments

I鈥檒l see if I can allocate some time tonight/tomorrow to see what kind of time impact we are looking at here. Doesn鈥檛 Chromium do this? I thought there was some discussion about whether to turn this off because of the performance impact.

Ah, I thought this was in the tc-build repo, whoops. I will still take a look at time stats just in case this is something we would want to turn on there (as well as seeing if it is feasible).

arm little endian allyesconfig shows some assertion failures (build log)

I am going to apply the following LLVM patches to see if anything changes:

Looks like with all of those patches, the following builds pass with assertions enabled:

  • arm little endian allyesconfig
  • arm64 little endian allyesconfig
  • ppc32 ppc44x_defconfig
  • ppc64le powernv_defconfig
  • x86_64 allyesconfig

Times:

  • Without assertions: 42m 16s
  • With assertions: 49m 48s

That's great to hear, thanks too for the stats!

Was this page helpful?
0 / 5 - 0 ratings