How to pass preprocessor definition to llvm build


I am using #ifdef MACRO_A in my llvm source code (in compiler-rt .c file). Wondering how to enable it in the llvm build command?

Currently I am using the following cmake command to build compiler-rt. How do I enable MACRO_A flag in the build command?



do the good-old CMAKE_CXX_FLAGS / CMAKE_C_FLAGS work?

Thank you Hsu.

But I finally ended up adding this line in the CMakeLists.txt of compiler-rt and this should work I guess.