aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/cc/common.cxx
AgeCommit message (Collapse)AuthorFilesLines
2024-01-10Fix bunch of typosBoris Kolpackov1-1/+1
2023-12-12Work around unexecuted member for installed libraries issueBoris Kolpackov1-4/+34
See comment for the long-term plan.
2023-09-07Search for .tbd in addition to .dylib in Mac OSBoris Kolpackov1-0/+25
Besides .dylib, Mac OS now also has "text-based stub libraries" that use the .tbd extension. They appear to be similar to Windows import libraries and contain information such as the location of the .dylib library, its symbols, etc. For example, there is /Library/.../MacOSX13.3.sdk/usr/lib/libsqlite3.tbd which points to /usr/lib/libsqlite3.dylib (but which itself is invisible/inaccessible, presumably for security). Note that for now we are treating the .tbd library as the shared library but could probably do the more elaborate dance with ad hoc members like on Windows if really necessary.
2023-08-29Add diagnostics color support on Windows (GH issue #312)Boris Kolpackov1-8/+39
Note that currently this has to be enabled with an explicit --diag-color option. In the future the plan is to enable it by default if supported.
2023-06-02Fix data race in library metadata protocol logicBoris Kolpackov1-2/+3
2022-12-09Enable diagnostics color in GCC and ClangBoris Kolpackov1-0/+49
2022-12-08Normalize extracted header/library search directories (GH issue #235)Boris Kolpackov1-0/+6
2022-12-06Handle bin.whole when specified for interface dependenciesBoris Kolpackov1-5/+23
2022-12-05Skip common .pc file for binless if found but rejected binful (GH issues #235)Boris Kolpackov1-3/+35
2022-10-10Preparatory work for public/private variable distinctionBoris Kolpackov1-2/+5
We still always use the public var_pool from context but where required, all access now goes through scope::var_pool().
2022-09-19Fix race between load and match phase logic in cc:search_library()Boris Kolpackov1-12/+25
2022-08-17Fix bug in handling of "in *.export.libs but not in prerequisites" caseBoris Kolpackov1-5/+16
2022-08-17Handle another "in *.export.libs but not in prerequisites" caseBoris Kolpackov1-48/+70
Also, enable this check even if proc_lib is not specified unless in the execute phase.
2022-07-19Fix bug in target::matched()Boris Kolpackov1-6/+1
2022-06-28Complete support for saving/loading library metadata to/from pkg-config filesBoris Kolpackov1-81/+155
2022-06-24Allow ad hoc rules not to list targets that are updated during matchBoris Kolpackov1-1/+3
For example, this allows a Qt moc rule not to list generated headers from libQtCore since they are pre-generated by the library.
2022-06-24Add ability to get common interface options via $x.lib_poptions()Boris Kolpackov1-25/+55
Specifically, the output target type may now be omitted for utility libraries (libul{} and libu[eas]{}). In this case, only "common interface" options will be returned for lib{} dependencies. This is primarily useful for obtaining poptions to be passed to tools other than C/C++ compilers (for example, Qt moc).
2022-05-05Recognize -pthread as king of -l in *.libsBoris Kolpackov1-23/+23
2022-04-15Adjust small vector limit in process_libraries()Boris Kolpackov1-40/+66
2022-04-13Prune library graph traversal for recursively-binless librariesBoris Kolpackov1-26/+50
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