You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Do not rebuild the include folder list repeatedely
Previously, during include detection, every pass through
IncludesToIncludeFolders would iterate over all included filenames found
so far, and rebuild the list of include folders from the list of
included libraries again.
This commit consistes of these changes:
- IncludesToIncludeFolders now looks at ctx.IncludeJustFound to find
new libraries (instead of ctx.Includes which contains all included
filenames found so far). To minimize changes in this commit, it still
creates a slice with just the single include found and processes
that. A future commit will simplify this.
- With that change, ctx.Includes is no longer used so it is removed.
- The resolveIncludeFolders function is removed. It used to build the
list of include folders, based on the list of imported libaries. This
list was built from scratch again every time, including the core and
variant folders. These two folders are now added once, by
ContainerFindIncludes, and adding the library's source folders to the
include folder list is done by IncludesToIncludeFolders.
- ContainerFindIncludes would start by calling IncludesToIncludeFolders
(even before any includes were detected) to ensure that the include
path contained the core and variant folders on the first preprocessor
run already. Now that these paths are added by ContainerFindIncludes,
there is no need for this extra call to IncludesToIncludeFolders, so
it is removed.
- resolveLibraries is modified to actually return only newly imported
libraries, not all imported libraries.
- resolveLibrary now returns the library it resolved to, instead of
just adding it to the markImportedLibrary map.
Signed-off-by: Matthijs Kooijman <matthijs@stdin.nl>
0 commit comments