aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/cc/compile-rule.cxx
AgeCommit message (Collapse)AuthorFilesLines
2022-12-09Enable diagnostics color in GCC and ClangBoris Kolpackov1-2/+24
2022-11-25Fix diag buffer opining logic in cc::compile_ruleBoris Kolpackov1-5/+11
2022-11-23Rework diag_buffer interface to facilitate correct destruction orderBoris Kolpackov1-21/+24
2022-11-22Add support for Objective-C/C++ compilation in cc moduleBoris Kolpackov1-22/+32
2022-11-16Initial low verbosity diagnostics reworkBoris Kolpackov1-1/+1
2022-11-08Make process exit diagnostics consistentBoris Kolpackov1-4/+4
In particular, we now always print error message on non-0 exit except in cases where such exit is ignored.
2022-11-08Work around suspected GCC 12 mis-compilation (bug #107555)Boris Kolpackov1-14/+22
2022-11-08Allow passing fail diag record to diag_buffer::close()Boris Kolpackov1-11/+4
2022-11-08Tighten args const-ness in the run*() function familyBoris Kolpackov1-4/+0
2022-11-08Rework header dependency extraction with diagnostics bufferingBoris Kolpackov1-245/+412
2022-11-08More work on child process diagnostics bufferingBoris Kolpackov1-5/+4
2022-10-27Suppress (potential) bogus GCC 12 -Wrestrict warningsBoris Kolpackov1-3/+3
2022-10-27Initial work on child process diagnostics bufferingBoris Kolpackov1-36/+55
Currently this is implemented for C/C++ compile and link rules.
2022-10-10Preparatory work for public/private variable distinctionBoris Kolpackov1-0/+4
We still always use the public var_pool from context but where required, all access now goes through scope::var_pool().
2022-10-05Check for `-`-spelled cl.exe options in addition to `/`-spelledBoris Kolpackov1-19/+29
2022-07-26Remove unused codeBoris Kolpackov1-66/+0
2022-06-24Add ability to control -I translation in $x.lib_poptions()Boris Kolpackov1-5/+5
2022-06-24Add ability to get common interface options via $x.lib_poptions()Boris Kolpackov1-10/+25
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-06Minor terminology fix in diagnostics and commentsBoris Kolpackov1-1/+1
2022-04-24Omit ignorable change detection for header unitsBoris Kolpackov1-1/+9
Since the checksum ignores preprocessor directives, this may cause us to ignore a change to an exported macro.
2022-04-19Use target recipe for auxiliary data storage during match-applyBoris Kolpackov1-15/+26
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 Kolpackov1-3/+0
2022-04-19Optimize header cache some more by storing hash in keyBoris Kolpackov1-3/+19
2022-04-19Skip find() inside target_set::insert*() if target is unlikely to be thereBoris Kolpackov1-2/+4
2022-04-14Add header cache to cc::compile_rule::enter_header()Boris Kolpackov1-28/+175
2022-04-07Rename {match,execute}() to *_sync(), add *_complete()Boris Kolpackov1-1/+1
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-06Add support for rule hintsBoris Kolpackov1-1/+1
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-07Add support for update=unmatch|match to ad hoc recipesBoris Kolpackov1-3/+9
2022-02-07Use target::as instead of static_cast everywhereBoris Kolpackov1-5/+5
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
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 Kolpackov1-16/+22
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
2021-11-23Add support for dynamic dependencies in ad hoc Buildscript recipesBoris Kolpackov1-725/+123
Specifically, add the new `depdb dyndep` builtin that can be used to extract dynamic dependencies from a program run or a file. For example: obje{hello.o}: cxx{hello} {{ s = $path($<[0]) depdb dyndep $cxx.poptions $cc.poptions --what=header --default-prereq-type=h -- $cxx.path $cxx.poptions $cc.poptions $cxx.mode -M -MG $s diag c++ ($<[0]) o = $path($>) $cxx.path $cxx.poptions $cc.poptions $cc.coptions $cxx.coptions $cxx.mode -o $o -c $s }} Currently only the `make` dependency format is supported.
2021-11-16Minor optimizations in cc::compile_ruleBoris Kolpackov1-5/+4
2021-11-08Incorporate derived target types into generated header logicBoris Kolpackov1-3/+25
2021-11-05Keep multiple prefixless entries for generated header mappingBoris Kolpackov1-33/+72
2021-10-07Verify libraries and targets they are linked to a for-install-compatibleBoris Kolpackov1-0/+1
2021-10-05Get rid of no longer necessary diagnosticsBoris Kolpackov1-38/+2
2021-10-04Optimize internal scope implementationBoris Kolpackov1-13/+9
2021-10-04Add support for treating specific libraries as always internalBoris Kolpackov1-6/+27
2021-10-01Add notion of internal scope, translate external -I to -isystem or equivalentBoris Kolpackov1-28/+244
2021-09-20Improve MSVC /showIncludes output handlingBoris Kolpackov1-13/+35
2021-08-10Complete process_libraries() duplicate suppression workBoris Kolpackov1-24/+45
2021-08-09Merge library hashing and collection into single traversal passBoris Kolpackov1-2/+2
It turns out this is a lot faster on deeply-dependent libraries like Boost while not having any noticeable differences for "sane" projects.
2021-08-05Implement traversal pruning in process_libraries()Boris Kolpackov1-19/+38