intel / intel/compile-time-init-build

enable efficient multi translation unit compilation

Open
#421 0 comments 0 reactions 1 assignee Claimed by @lukevalenty View on GitHub
breaking enhancement
Dominant language
C++
Stars
648
Forks
63
Avg merge
4h 25m
Merged PRs (30d)
17

Description

CIB is currently designed for single translation-unit compilation. This can result in very long compilation and re-compilation times. It would be very helpful to enable the option for multi translation unit compilation.

This can be done by decoupling service extension declarations from definitions. The resulting API will look something like this:
1) CIB component declarations go into header files.
- Component declarations represent how a component interfaces with the rest of the system. It exports services it provides and extends services as needed.
- Instead of providing callables or the equivalent to extensions, a string tag-type is used to name each extension. Tag dispatch is used for extensions to call their implementation (which can be located in a different translation unit). LTO is recommended, but not required.
2) CIB extension implementations can be in independent translation units.
3) All component header files are included in a project's nexus translation unit. All of the compile-time initialization and build happens in this one translation unit. These header files do not need to be included by any other translation unit.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.