See target.fbs
See Target APIs present in the ../../buildcc/lib/target/include/target/api folder
- A Target is two stage procedure consisting of compiling (preprocessing + compiling) and linking.
- During compiling we can compile
- Header files to PCH files
- Source files to Object files
- During linking we take our objects and create a Target
typeis the ssociated target type- Executable
- Static Library
- Dynamic Library
- C++20 Modules (Future)
source_filesare input files that will be compiled to object filesheader_filesare tracked for better rebuildspch_filesare tracked for certain headers that need to be aggregated to a single PCH output.- If any one of these pch files change we need to recompile our PCH output.
lib_depsare Targets of type- Static Library
- Dynamic Library
- C++20 Modules (Future)
external_lib_depsare library links- For example: -lpthread, -lm in GCC
include_dirsare include directories to find header files used in source files.lib_dirs: are library directories to find external lib deps during linking.
preprocessor_flagsare preprocessor macros added during compilingcommon_compile_flagsare compile flags added to PCH, ASM, C and C++ sourcespch_compile_flagsare compile flags only added- if pch is enabled i.e pch files are added
- during pch compile command stage
pch_object_flagsare compile flags only added- if pch is enabled i.e pch files are added
- during object compile command stage
- NOTE: This is because most source -> object files depend on the generated pch files
asm_compile_flagsare specific compile flags added to ASM sourcesc_compile_flagsare specific compile flags added to C sourcescpp_compile_flagsare specific compile flags added to CPP sourceslink_flagsare specific link flags added duringlink_commandstage
compile_dependenciesare user compile dependencies that cause all sources to recompile if any compile dependency is REMOVED, ADDED or UPDATEDlink_dependenciesare user link dependencies that cause target to recompile if any link dependency is REMOVED, ADDED or UPDATED
TODO, Add pch_dependencies