aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/cc
AgeCommit message (Collapse)AuthorFilesLines
2022-04-24Fix bug in previous commitBoris Kolpackov1-1/+1
2022-04-24Recognize ARM64 as MSVC targetBoris Kolpackov1-12/+19
2022-04-20Fix bug in recursively-binless detection logicBoris Kolpackov1-1/+5
2022-04-20Get rid of unnecessary move() callBoris Kolpackov1-1/+1
2022-04-19Use target recipe for auxiliary data storage during match-applyBoris Kolpackov5-43/+84
In particular, we now have separate auxiliary data storage for inner and outer operations.
2022-04-19Switch to using std::function for target::data_padBoris Kolpackov3-9/+2
2022-04-19Optimize header cache some more by storing hash in keyBoris Kolpackov2-4/+42
2022-04-19Skip find() inside target_set::insert*() if target is unlikely to be thereBoris Kolpackov1-2/+4
2022-04-15Adjust small vector limit in process_libraries()Boris Kolpackov2-43/+86
2022-04-15Get rid of target::dynamic_type() virtual functionBoris Kolpackov1-12/+30
Instead of overriding this function, derived targets must now set the dynamic_type variable to their static_type in their constructor body.
2022-04-14Add header cache to cc::compile_rule::enter_header()Boris Kolpackov3-32/+193
2022-04-13Fix bug in previous commitBoris Kolpackov1-1/+1
2022-04-13Prune library graph traversal for recursively-binless librariesBoris Kolpackov3-57/+213
2022-04-13Add automatic interface dependency deduplication in cc::process_libraries()Boris Kolpackov3-18/+92
2022-04-07Rename {match,execute}() to *_sync(), add *_complete()Boris Kolpackov2-2/+2
In particular, the match() rename makes sure it doesn't clash with rule::match() which, after removal of the hint argument in simple_rule, has exactly the same signature, thus making it error-prone to calling recursively.
2022-04-06Work around Clang warningsBoris Kolpackov1-0/+4
2022-04-06Add support for rule hintsBoris Kolpackov9-45/+43
A rule hint is a target attribute, for example: [rule_hint=cxx] exe{hello}: c{hello} Rule hints can be used to resolve ambiguity when multiple rules match the same target as well as to override an unambiguous match.
2022-03-30Infrastructure for library metadata supportBoris Kolpackov3-9/+334
2022-03-28Respect dry-run in Windows assembly creation logicBoris Kolpackov1-3/+8
2022-03-28Add ability to customize pkg-config header and library search pathsBoris Kolpackov3-11/+46
Specifically, {cc,c,cxx}.pkgconfig.{include,lib} variables specify header (-I) and library (-L) search paths to use in the generated .pc files instead of the default install.{include,lib}. Relative paths are resolved as install paths.
2022-03-25Store bin.whole flag in pkg-config filesBoris Kolpackov2-14/+47
2022-03-17Handle absolute POSIX paths in MinGW GCC search pathsBoris Kolpackov1-2/+34
2022-03-17Diagnose invalid paths in -print-search-dirs outputBoris Kolpackov1-8/+28
For example, some mis-configured MinGW GCC builds include /mingw/lib.
2022-03-15Don't consider mtime of failed to unmatch prerequisite in ad hoc recipeBoris Kolpackov1-1/+2
2022-03-10Add reverse_execute_prerequisites() variantBoris Kolpackov1-5/+24
2022-03-10Remove update variable from source of synthesized dependencyBoris Kolpackov1-1/+14
2022-03-09Parallel implementation of update_during_match_prerequisites()Boris Kolpackov1-2/+3
2022-03-08Improve performance of update during match for multiple targetsBoris Kolpackov1-9/+5
2022-03-08Update C/C++ headers and ad hoc sources during match by defaultBoris Kolpackov1-19/+50
Essentially, all headers as well as ad hoc headers and sources are now treated by the cc::link_rule as if they had update=match unless explicit update=execute is specified.
2022-03-08Add update=execute special value for cases where it's not defaultBoris Kolpackov1-1/+1
2022-03-07Add support for update=unmatch|match to ad hoc recipesBoris Kolpackov2-7/+15
2022-03-02Add update operation-specific variable with unmatch|match additional valuesBoris Kolpackov3-13/+97
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-16Get rid of stray variableBoris Kolpackov1-2/+0
2022-02-15Fix stray logic where libue{} was still considered member of libul{}Boris Kolpackov1-10/+27
Fixes GitHub issue #179.
2022-02-15Diagnose various misuses of library metadata protocolBoris Kolpackov2-0/+13
2022-02-10Add note on GNU ar deprecating -T in favor of --thinBoris Kolpackov1-0/+3
2022-02-09Improve commentsBoris Kolpackov1-3/+6
2022-02-07Use target::as instead of static_cast everywhereBoris Kolpackov1-5/+5
2022-02-02Redo diagnostics without operator<< in namespace stdBoris Kolpackov2-0/+5
2022-01-21Add another overload of to_target(), declare in functions-name.hxxBoris Kolpackov1-3/+2
2022-01-21Add search_new() and search_new_locked() variants of search()Boris Kolpackov1-2/+2
2022-01-17Use UTF-8 as default input/source charset for C/C++ compilationBoris Kolpackov1-27/+89
2022-01-11Add note on MSVC warning C4819Boris Kolpackov1-0/+2
2022-01-10Add psapi.lib and iphlpapi.lib to list of Windows system librariesBoris Kolpackov1-0/+2
2021-12-17Add TODO commentBoris Kolpackov1-0/+5
2021-12-14Clarify commentBoris Kolpackov1-3/+2
2021-12-06Recognize absolute Windows paths in make parserBoris Kolpackov1-9/+20
2021-11-30Add support for dynamic dependencies as byproduct of script bodyBoris Kolpackov2-17/+23
Specifically, the `depdb dyndep` builtin now has the --byproduct option (which must come first). In this mode only the --file input is supported. For example: obje{hello.o}: cxx{hello} {{ o = $path($>) t = $(o).t depdb dyndep --byproduct --what=header --default-type=h --file $t diag c++ ($<[0]) $cxx.path $cxx.poptions $cc.poptions $cc.coptions $cxx.coptions $cxx.mode -o $o -MD -MF $t -c $path($<[0]) }} Naturally, this mode does not support dynamic auto-generated prerequisites. If present, such prerequisites must be specified statically in the buildfile. Note also that the --default-prereq-type option has been rename to --default-type.
2021-11-28Avoid unnecessary work in depdb::close() if using static check_mtime()Boris Kolpackov1-1/+1
2021-11-28Generalize depdb::touch functionality to support custom timestampBoris Kolpackov1-1/+1