Building Julia with LLVM_ASSERTIONS

I’m trying to build Julia with LLVM_ASSERTIONS = 1, but I’m failing miserably so far. How exactly do I set this variable? Put it in a Make.user file on the source root and that’s it? Do I need a override LLVM_ASSERTIONS = 1? Or can I just set the environment and run something like $ LLVM_ASSERTIONS=1 make debug -j4 from bash? Or make LLVM_ASSERTIONS=1 debug? I have tried everything, and the -debug-only argument is never there, and JULIA_LLVM_ARGS="--version" ./usr/bin/julia-debug always shows “Optimized build.”, what am I missing?

Yes, that’s the idea - of course it’s possible that this got broken recently with the switch to the pre-built dependency binaries. We might have to disable those if any of the LLVM options are set.

1 Like

Alright, now that you mentioned binaries I see there’s a new “BINARYBUILDER_LLVM_ASSERTS := 0” on the makefile, I guess I should just flip that, or else deactivate the binary builder? We’ll see, thanks!

That option is broken, sadly:

1 Like

OK, so then I basically need this?


Should I make a patch for the docs?

A fix to the binary builders in order to provide an asserts build seems like the more logical change. Not sure if we can help out with that, @staticfloat?