aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/cc/common.cxx
AgeCommit message (Collapse)AuthorFilesLines
2022-04-13Add automatic interface dependency deduplication in cc::process_libraries()Boris Kolpackov1-16/+80
2022-03-30Infrastructure for library metadata supportBoris Kolpackov1-2/+7
2022-03-02Add update operation-specific variable with unmatch|match additional valuesBoris Kolpackov1-1/+1
Note that the unmatch (match but do not update) and match (update during match) values are only supported by certain rules (and potentially only for certain prerequisite types). Additionally: - All operation-specific variables are now checked for false as an override for the prerequisite-specific include value. In particular, this can now be used to disable a prerequisite for update, for example: ./: exe{test}: update = false - The cc::link_rule now supports the update=match value for headers and ad hoc prerequisites. In particular, this can be used to make sure all the library headers are updated before matching any of its (or dependent's) object files.
2022-02-15Diagnose various misuses of library metadata protocolBoris Kolpackov1-0/+4
2021-10-07Verify libraries and targets they are linked to a for-install-compatibleBoris Kolpackov1-3/+4
2021-08-12Add ${c,cxx}.deduplicate_export_libs() functionBoris Kolpackov1-0/+2
This function deduplicates interface library dependencies by removing libraries that are also interface dependencies of the specified libraries. This can result in significantly better build performance for heavily interface-interdependent library families (for example, like Boost). Typical usage: import intf_libs = ... import intf_libs += ... ... import intf_libs += ... intf_libs = $cxx.deduplicate_export_libs($intf_libs)
2021-08-12Avoid duplication in Libs/Libs.private in generated .pc filesBoris Kolpackov1-0/+2
2021-08-11Optimize process_libraries() some moreBoris Kolpackov1-15/+41
2021-08-05Implement traversal pruning in process_libraries()Boris Kolpackov1-360/+376
2021-08-05Add resolved library cache, use in cc::process_libraries()Boris Kolpackov1-8/+61
2021-05-13Add ${c,cxx}.find_system_{header,library}() functionsBoris Kolpackov1-0/+4
2021-05-04Replace int_ with intf_ and imp_ with impl_ in namesBoris Kolpackov1-7/+7
2021-05-04Handle duplicate suppression of multi-element libraries (-l foo)Boris Kolpackov1-22/+126
See GitHub issue #114 for context.
2021-02-11Generalize process_libraries() to allow no picking installed library memberBoris Kolpackov1-37/+64
2021-02-09Minor simplificationBoris Kolpackov1-2/+2
2021-02-03Propagate relevant options/prerequisites to header unit sidebuildsBoris Kolpackov1-2/+15
2021-01-21Use target name to derive binless library -l-nameBoris Kolpackov1-0/+4
2020-12-11Add support for module interface-only librariesBoris Kolpackov1-2/+2
Also suppress generation of the object file in cases where we don't need it.
2020-12-04Fix bug in installed libraries matching logicBoris Kolpackov1-24/+34
2020-12-03Fix lock/unlock orderBoris Kolpackov1-1/+2
2020-12-03Fix bug in previous commitBoris Kolpackov1-2/+2
2020-12-03Fix modules support for installed librariesBoris Kolpackov1-5/+23
2020-11-13Minor tracing fix and additionBoris Kolpackov1-0/+3
2020-07-17Fix race in path/mtime assignment and file_rule::match()Boris Kolpackov1-17/+7
2020-07-01Fix bug in *.export.imp_libs logicBoris Kolpackov1-2/+2
2020-07-01Add *.export.imp_libs to get rid of dual *.export.libs semanticsBoris Kolpackov1-36/+35
2020-06-26Minor terminology fix in commentsBoris Kolpackov1-3/+2
2020-06-26Fix race in library metadata protocolBoris Kolpackov1-2/+3
Specifically, we need to check whether the prerequisite_member is ad hoc before checking whether it is NULL because ad hoc ones are blanked out (set to NULL) during execute.
2020-05-22Make template definition available in all translation units where usedBoris Kolpackov1-27/+0
We were trying to be clever but GCC 10's IPA-SRA optimization didn't like it.
2020-04-30Rename target::member to target::adhoc_memberBoris Kolpackov1-1/+1
2020-04-27Rework tool importation along with cli moduleBoris Kolpackov1-14/+2
Specifically, now config.<tool> (like config.cli) is handled by the import machinery (it is like a shorter alias for config.import.<tool>.<tool>.exe that we already had). And the cli module now uses that instead of custom logic. This also adds support for uniform tool metadata extraction that is handled by the import machinery. As a result, a tool that follows the "build2 way" can be imported with metadata by the buildfile and/or corresponding module without any tool-specific code or brittleness associated with parsing --version or similar outputs. See the cli tool/module for details. Finally, two new flavors of the import directive are now supported: import! triggers immediate importation skipping any rule-specific logic while import? is optional import (analogous to using?). Note that optional import is always immediate. There is also the import-specific metadata attribute which can be specified for these two import flavors in order to trigger metadata importation. For example: import? [metadata] cli = cli%exe{cli} if ($cli != [null]) info "cli version $($cli:cli.version)"
2020-02-07Drop copyright notice from source codeKaren Arutyunov1-1/+0
2020-02-04Add note to manual on specifying search paths in compiler modeBoris Kolpackov1-0/+2
2020-02-03Add header/library search paths from compiler mode to sys_*_dirsBoris Kolpackov1-50/+16
2020-01-31Propagate installed library out (tag) when converting to nameBoris Kolpackov1-8/+18
2020-01-31Tag installed library targets with linker pathBoris Kolpackov1-20/+29
This makes sure we get different targets for different toolchains.
2019-11-29Reorder {cc,c/cxx}.{poptions,loptions}Boris Kolpackov1-4/+5
Now it is c/cxx first followed by cc which is the reverse order of coptions since the header/library search paths are examined in the order specified (in contrast to the "last value wins" semantics that we assume for coptions).
2019-11-07Don't add $install.lib to module library search path if import.build2 is NULLBoris Kolpackov1-6/+21
2019-11-05Add support for automatic importing of libbuild2 of installed caseBoris Kolpackov1-1/+16
2019-10-08Extend /LIBPATH handling to win32-msvc target systemBoris Kolpackov1-1/+3
2019-10-01Adapt to renaming butl::casecmp() to icasecmp()Karen Arutyunov1-1/+1
2019-08-28Move cc build system module to separate libraryKaren Arutyunov1-0/+1031