I try to make a build directory with optimization in mind. But instead of
…/llvm/configure --enable-optimized --disable-assertions
I want to use cmake and ninja afterwards. I have tried various things but I can’t achieve what I want. cmake recognizes a variable for assertions (LLVM_ENABLE_ASSERTIONS=OFF) but I can’t find something similar for optimizations.
Is it possible to achieve what I try with ninja?
Thx in advance.
You can use -DCMAKE_BUILD_TYPE=Release to create a release build.
That turns on optimisations and turns off assertions by default;
LLVM_ENABLE_ASSERTIONS can be used to independently control assertions.
Thanks,
George Kastrinis
<george.kastrinis@logicblox.com> writes:
I try to make a build directory with optimization in mind. But instead of
../llvm/configure --enable-optimized --disable-assertions
I want to use cmake and ninja afterwards. I have tried various things but I
can't achieve what I want. cmake recognizes a variable for assertions
(LLVM_ENABLE_ASSERTIONS=OFF) but I can't find something similar for
optimizations.
Is it possible to achieve what I try with ninja?
Peter solved your specific problem. For a more broad explanation about
the LLVM CMake build system, see http://llvm.org/docs/CMake.html