mirror of
https://github.com/dexoron/dcr.git
synced 2026-10-21 13:28:30 +00:00
894 B
894 B
Compilers & linking
Compiler backend selection
DCR picks a backend from build.compiler:
- contains
clang-cl-> MSVC backend - contains
gccorg++-> GCC backend - contains
clangorclang++-> Clang backend - equals
clor containsmsvc-> MSVC backend - otherwise -> Clang backend fallback
Compilation model
- Source files are found recursively in
src/based onbuild.language. - Each source is compiled to
target/<profile>/obj/<relative-path>.o(.objon MSVC). - Recompile happens when source mtime is newer than object mtime.
Linking
For kind = "bin":
- Object files are linked into executable artifact.
- Dependency lib dirs and library names are passed to linker.
build.ldflagsare appended to link command.
For kind = "staticlib":
- Linux/macOS (GCC/Clang):
ar rcscreates.aarchive. - Windows (MSVC):
libcreates.libarchive.