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
type
is the ssociated target type- Executable
- Static Library
- Dynamic Library
- C++20 Modules (Future)
source_files
are input files that will be compiled to object filesheader_files
are tracked for better rebuildspch_files
are 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_deps
are Targets of type- Static Library
- Dynamic Library
- C++20 Modules (Future)
external_lib_deps
are library links- For example: -lpthread, -lm in GCC
include_dirs
are include directories to find header files used in source files.lib_dirs
: are library directories to find external lib deps during linking.
preprocessor_flags
are preprocessor macros added during compilingcommon_compile_flags
are compile flags added to PCH, ASM, C and C++ sourcespch_compile_flags
are compile flags only added- if pch is enabled i.e pch files are added
- during pch compile command stage
pch_object_flags
are 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_flags
are specific compile flags added to ASM sourcesc_compile_flags
are specific compile flags added to C sourcescpp_compile_flags
are specific compile flags added to CPP sourceslink_flags
are specific link flags added duringlink_command
stage
compile_dependencies
are user compile dependencies that cause all sources to recompile if any compile dependency is REMOVED, ADDED or UPDATEDlink_dependencies
are user link dependencies that cause target to recompile if any link dependency is REMOVED, ADDED or UPDATED
TODO, Add pch_dependencies