summaryrefslogtreecommitdiff
path: root/rules
AgeCommit message (Collapse)Author
2024-10-25["lint", "targets"]: Also have a metadata fileKlaus Aehlig
... containing the names of artifacts (files or directories) that are from the target itself of the runfiles of direct dependencies. This allows tools to check some form of strict dependency structure.
2024-10-25lint information: also provide the direct-deps artifacts separatelyKlaus Aehlig
2024-10-23pkgconfig rules: fix usage of "join_cmd"Klaus Aehlig
2024-10-21shell defaults: properly deduplicate "bin dirs" to the leftKlaus Aehlig
2024-09-12Rules CC: Deduplicate args returned by expressions collecting args from ↵Sascha Roloff
dependencies
2024-09-11["lint", "targets"]: improve documentation stringsKlaus Aehlig
2024-08-30Drop expressions for first/last element of a list entirelyKlaus Aehlig
... as using the built-in "[]" directly is cleaner and equally readable.
2024-08-22Add ["lint", "defaults"] to provide paths for lint actionsKlaus Aehlig
... and honor those in ["lint", "targets"].
2024-08-21["test", "suite"]: document fieldsKlaus Aehlig
2024-08-20Add ["test", "suite"]Klaus Aehlig
... collecting test results similar to the way "install" rules are typically used; however in such a way that the provider "lint" is forwarded.
2024-08-20["shell/test", "script"] forward lint information of depsKlaus Aehlig
2024-08-20["CC", "test"]: support providing lint informationKlaus Aehlig
While there, also properly transition "srcs" and "private-hdrs" to the host version.
2024-08-20["lint", "targets"]: deduplicate tasksKlaus Aehlig
In case many "targets" are given, the field "lint" will contain all the concatenation of the provider "lint" of the given targets. There is, however, not need to lint the same file in the same context twice, so deduplicate the targets first. While this does not change the amount of lint actions carried out (as equal actions are handled only once anyway), it keeps the summary clean by not having dulicate entries.
2024-08-14new rule ["lint", "targets"]Klaus Aehlig
2024-08-14Make CC binary and library support providing information for lintingKlaus Aehlig
If the configuration variable "LINT" is set, also provide information on compile actions and header files (with preprocessing as described command, in particular also providing the correct flags) in correct dependency context. In this way, lint rules can request the needed information for performing their checks.
2024-08-07Add field to ["CC", "defaults"] to specify arguments for arKlaus Aehlig
... instead of hard-coding ["cqs"].
2024-08-05rules shell/test: Add 'keep-dirs' fieldPaul Cristian Sarbu
The existing rules allow a shell test script to explicitly 'keep' created files in the resulting output directory, to be accessible to any dependent target, thus allowing a chaining of data across test scripts. This field however excludes directories, whose content would need to be added one file at a time to the 'keep' field. Add instead also a 'keep-dirs' field to ["shell/test", "script"] rule which allows the explicit staging of given directory paths the test is expected to generate.
2024-07-29["CC", "binary"] stage link actionKlaus Aehlig
... to avoid staging conflicts with the toolchain
2024-07-29["CC", "libary"] properly stage ar actionKlaus Aehlig
In this action we support a user provided toolchain, hence all the components of the library need to go into a subdirectory to avoid staiging conflicts.
2024-07-12Test summarizer: also report on average timeKlaus Aehlig
... of passed tests (as only for those, the time is meaningful). Given that we read the timing information anyway, if available, we can as well report more useful information.
2024-07-12Test rules: only provide to the summary action what is neededKlaus Aehlig
... and add a rule allowing the summarizer to specify what it needs.
2024-07-12Tests: also record `pwd`Klaus Aehlig
... as test meta data. Tests are executed in an unspecified directory, assuming pass or fail is independent of the location where the test is run. While this generally is true, test logs often contain the working directory. So, in order to more easily compare different execution orders of a potential race condition, it can be desirable to compare logs "up to the execution directory". This, however, requires that this directory is recored in the first place. Do so. For consistency of the output format, also have a (fixed) artifact pwd in the summary report.
2024-07-05tests: support additional remote-execution properties for summariesKlaus Aehlig
If a test is run several times (as set by RUNS_PER_TEST), a summary of the individual test runs is computed using a summarizer as configured in the target layer of the rules. As the inputs for computing that test summary are all the individual test runs, that action has a large number of files as input, including a large number of identical files, e.g., the ones indicating the outcome of an individual run. Therefore, allow setting additional remote-execution properties allowing to dispatch that action to a suitable end point.
2024-07-01["patch", "file"]: honor shell bin dirsKlaus Aehlig
... as we need to copy a file, as not all versions of patch accept the file to patch as argument.
2024-07-01["CC/auto", "config"]: honor bin dirs of shell defaultsKlaus Aehlig
2024-07-01["shell", "defaults"]: support "bin dirs"Klaus Aehlig
2024-06-25CC defaults: Provide the debug stage also for implicit depsPaul Cristian Sarbu
This ensures that one can inspect, e.g., generated protobuf source files (.pb.cc) or standard library headers while debugging proto libraries or general C++ libraries and binaries, respectively.
2024-06-24CC/proto: Libraries should be aware of DEBUG flagPaul Cristian Sarbu
2024-06-24CC: Fix some doc typosPaul Cristian Sarbu
2024-06-19rules-cc: Binaries should keep the compile dependency headers for debuggingv1.4.0-alpha+20240619Paul Cristian Sarbu
2024-06-10Add support for protobuf compiler flagsOliver Reiche
2024-06-03debug rule: Fix staging of headersPaul Cristian Sarbu
For libraries the headers of private dependencies were wrongly skipped from staging. For binaries, no headers were passed at all in the provides map. To fix these issues, an additional field is added in the provides map to ensure we collect, and then properly stage, all needed headers for both libraries and binaries.
2024-06-03debug rule: Add flag field to skip installing extra debug artifactsPaul Cristian Sarbu
This is useful when we want to install targets built in debug mode, but do not want to stage all the additional source and header files if no debugging is being performed, e.g., in tests.
2024-05-27CC: if no CC/CXX/AR is provided via the toolchain, default to cc/c++/arKlaus Aehlig
... instead of defaulting to "". In this way, an empty default target can be used as toolchain defaults for systems with default names.
2024-05-24Prefer built-in array access over implementing "first" and "last" using foldlKlaus Aehlig
2024-05-23["CC/pkgconfig", "system_library"]: honor shell toolchainKlaus Aehlig
... instead of hard-coding /bin/sh.
2024-05-21["CC/auto", "config"] also honor shell-toolchain-provided PATHKlaus Aehlig
2024-05-15Add shell defaultsKlaus Aehlig
So far, our rules, where depending on the shell, implicitly use "normal" defaults, hard-coded in the rules. Support configuring those in a default target, in the same way we do so for other tools, like the C compiler. In this, it is also possible to bring your own shell, built as a (compiled) target.
2024-05-13rules: Support staging debug artifacts in install-with-deps rulePaul Cristian Sarbu
The existing rule is extended to also stage source files if in debug mode, in order for a debugger to be able to find all needed symbols. Conflicting paths are allowed; in case of conflicts, the file from the closest target in the dependency chain wins.
2024-05-13install-with-deps result: Remove unneeded importsPaul Cristian Sarbu
2024-05-04["CC/pkgconfig", "system_library"]: honor ENV also for aux actionKlaus T. Aehlig
Our pkg config rule postprocesses the output of pkgconfig to add options -rpath where appropriate. This postprocessing, however, relies on (standard) tools from the environment, in particular cat(1). Therefore, the environment (in particular PATH) needs to be set properly for this auxilliary action.
2024-04-29["CC", "defaults"] rule: Add "ADD_COMPILE_FLAGS"Klaus Aehlig
The C++ programming language is tightly related to the C programming language. Consequently, the command line interface for C and C++ are also related and share quite a number of compile flags. Honor this tight connection by have in our defaults a field allowing to extend both compile flags, those for C as well as those for C++. In this way, build defaults can be described in a more readable way.
2024-04-29["CC/test", "test"]: support TIMEOUT_SCALEKlaus Aehlig
... to allow test actions to have a larger time out, while not changing anything in the build actions (and hence being able to use cache hits from normal build of the library being tested).
2024-04-17["CC/test", "test"] runner: set TMPDIRKlaus Aehlig
... to the same value as TEST_TMPDIR. While TEST_TMPDIR is the conventional name that tests should use for their temporary file, setting TMPDIR as well has the advantage that more library functions can be used to create temporary files and directories, as quite a few of them inspect the variable TMPDIR. While there, also fix some typos in the documentation strings.
2024-04-17["CC/test", "test"] use stage expressionKlaus Aehlig
... instead of inlining the code. In this way, we also have all the checks that the test runner consists of precisely one artifact.
2024-03-05test summarizer: in case of FLAKY tests, also report failure rateKlaus Aehlig
2024-02-15Remove unnecessarily quadratic expressionsKlaus Aehlig
... not that everyone has updated to 1.2 or later we can use the built-in expressions "reverse" and "set".
2023-11-20rules: Fix flag inheritanceOliver Reiche
... which should accumulate values from all base targets unless the flag type (CFLAGS, CXXFLAGS, or LDFLAGS) is explicity overwritten by the inheritor.
2023-11-09["CC/auto", "config_file"] runner: let /usr/bin/env find python3Klaus T. Aehlig
... instead of assuming it to be installed under /usr/bin as we also do in other places. In this way, we do not make any additional assumptions on top of the already existing one on the path of env.
2023-09-29rule ["patch", "defaults"]: remove unused config variable "TARGET_ARCH"Klaus Aehlig