Replace LLVM_ENABLE_ASSERTION with FORCE_BUILD_LLVM_DISABLE_NDEBUG, and add FORCE_BUILD_LLVM_DEBUG.

FORCE_BUILD_LLVM_DISABLE_NDEBUG and FORCE_BUILD_LLVM_DEBUG are
environment variables analogous to FORCE_BUILD_LLVM_COMPONENTS.

FORCE_BUILD_LLVM_DISABLE_NDEBUG compiles with -D_DEBUG -UNDEBUG.  This
has the effect of enabling assert() and certain internal behaviors
(e.g., various LLVM sanity checks).  FORCE_BUILD_LLVM_DISABLE_NDEBUG
must be set consistently during builds of llvm, clang, libbcc, and
slang to avoid undefined behavior.

FORCE_BUILD_LLVM_DEBUG compiles host code (but not device code) with -O0 -g.

Depends on similar changes in llvm, clang, and slang.

Change-Id: Ic7cbfeb5fd97061c82a007324fb851eda2117f19
1 file changed