enhance(compiler): Add support for debug builds in Makefile

This adds a new variable `BUILD_TYPE` to the Makefile, controlling
whether the build should be a debug or a release build (values `Debug`
and `Release`, respectively). The default mode is `Release`. Depending
on the build type, the build directory is set to `build-Debug` or
`build-Release`. This enables debug and release builds to co-exist and
to switch easily between the two.
This commit is contained in:
Andi Drebes
2022-09-16 15:25:19 +02:00
committed by rudy-6-4
parent 7427a4506d
commit 847e8607f3

View File

@@ -1,4 +1,5 @@
BUILD_DIR=./build
BUILD_TYPE?=Release
BUILD_DIR?=./build-$(BUILD_TYPE)
Python3_EXECUTABLE?=
BINDINGS_PYTHON_ENABLED=ON
DATAFLOW_EXECUTION_ENABLED=OFF
@@ -109,7 +110,7 @@ $(BUILD_DIR)/configured.stamp:
-DLLVM_ENABLE_PROJECTS="mlir;clang;openmp" \
-DLLVM_BUILD_EXAMPLES=OFF \
-DLLVM_TARGETS_TO_BUILD="host" \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_BUILD_TYPE=$(BUILD_TYPE) \
-DLLVM_ENABLE_ASSERTIONS=ON \
-DMLIR_ENABLE_BINDINGS_PYTHON=$(BINDINGS_PYTHON_ENABLED) \
-DCONCRETELANG_BINDINGS_PYTHON_ENABLED=$(BINDINGS_PYTHON_ENABLED) \