How to get the build configuration options of the game code? - C++ Hot Reload integration

Long Story Short
How to get access either in C++ (using global methods like Ly::GetGamePath(), etc) or/and reading from a file the build configuration applied to compile the game source code?

More Info
Basically in C++ Hot Reload, I need to build the the modified classes with the same options as the Ly does and have knowledge about include paths, preprocessor macros, library paths, libraries to link with, .pch path, etc. The final build configuration of the engine to configure automatically everything. Where I have info about all of that? Does Ly generate response files or another type of file where that information is dumped?

Thanks for your answer and support.

PS: I’m trying to achieve an official and free community integration for all the Ly fans

@Prompt I’ve found a solution to get the information you seem to need.

  1. Download the clang_compilation_database.py from the official waf git (latest): https://gitlab.com/ita1024/waf/blob/7778868718333932708a3915825f5c3f4ac53341/waflib/extras/clang_compilation_database.py
  2. (optional) python 2.7 compat: Edit the print(… “…%s”) line to use print(…"…{}".format(…)) instead.
  3. Save into dev/tools/build/waf-1.7.13/waflib/extras
  4. edit /dev/tools/build/waf-1.7.13/lmbrwaflib/lumberyard.py, add a define for EXTRAS_WAF_TOOL_DIR (see below)
EXTRAS_WAF_TOOL_DIR = os.path.join(WAF_TOOL_ROOT_DIR, "waflib", "extras")
  1. edit dev/tools/build/waf-1.7.13/lmbrwaflib/lumberyard.py, add the below block of code to LMBR_WAFLIB_MODULES= (see below)
...
LMBR_WAFLIB_MODULES = [
...
 
 
 ( EXTRAS_WAF_TOOL_DIR , [
        'clang_compilation_database'
    ] ) ,
...
  1. Recompile with uberfiles disabled to generate compile_commands.json
  2. Compilation info can be found at dev/BinTemp/{solution_config}/compile_commands.json

Hope this helps!

Thanks for the reply @Nggieber, very informative.

I’ll try that to see what generates.