summaryrefslogtreecommitdiff
path: root/CC
AgeCommit message (Collapse)Author
2024-08-09object artifacts: honor modified transitionKlaus Aehlig
... for certain fields, in particular, the "components".
2024-08-09compile-deps: include provided deps of componentsKlaus Aehlig
... however not their runfiles, as those become the runfiles of the resulting library.
2024-08-07Merge branch 'just-rules' into rulesKlaus Aehlig
2024-08-07Add field to ["CC", "defaults"] to specify arguments for arKlaus Aehlig
... instead of hard-coding ["cqs"].
2024-07-29Merge branch 'just-rules' into rulesKlaus Aehlig
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-25["CC", "library"] Add concept of componentsKlaus Aehlig
... i.e., dependencies that are to be included into the library itself. In this way, a large library (convenient for a user to have single library to care about) can be defined as a collection of smaller libraries. Technically, components are like public dependencies on libraries transitioned to object libraries with the following differences - the header files (i.e., runfiles) of the components become header files of the resulting libary, and - the objects (i.e., artifacts) of the components become objects of the library rather than link dependencies. To achive the transfer of the object to the requesting library, an object library can be instructed to drop the objects from the link arguments; in order to continue to support tranditional object libraries in the style of, e.g., cmake, this is done by a different configuration variable that is transitioned as well. In particular, the object-library test case (using a configure target) can be left unchanged.
2024-07-25["CC", "library"]: Make object-only a configuration propertyKlaus Aehlig
... instead of a property of the library itself. An object library is not a meaningful concept in itself; it only exists, because a consumer wants to link the library in its entirety. But consumer-specified properties should be propagated through configuration transitions and the definition of the library should not care about how it is consumed; this is also the approach we follow with respect to building a library position independent. As oposed to position-independent building, however, the property of being included unconditionally is not propagated transitively.
2024-07-12Merge branch 'just-rules' into rulesKlaus Aehlig
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-08["CC/test", "test"]: Honor shell-toolchain PATH for summary actionKlaus Aehlig
2024-07-05Merge branch 'just-rules' into rulesKlaus Aehlig
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-01Merge branch 'just-rules' into rulesKlaus Aehlig
2024-07-01["CC/auto", "config"]: honor bin dirs of shell defaultsKlaus Aehlig
2024-06-25Merge commit 'c301e85a61dc6e43b8cc6ce8f44a902c392163a2' into HEADPaul Cristian Sarbu
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-24Merge commit 'cdd0b740cdaf6fd54d479766f8be45352f238bd4' into HEADPaul Cristian Sarbu
2024-06-24CC/proto: Libraries should be aware of DEBUG flagPaul Cristian Sarbu
2024-06-24CC: Fix some doc typosPaul Cristian Sarbu
2024-06-19Merge commit '85f97ddf0e18548d95d50aa1f7599a1aad833d97' into HEADPaul Cristian Sarbu
2024-06-19rules-cc: Binaries should keep the compile dependency headers for debuggingPaul Cristian Sarbu
2024-06-11["CC/foreign/shell", "data"] honor shell toolchainKlaus Aehlig
2024-06-11foreign rules: fix computation of absolute pathsKlaus Aehlig
When setting CC, etc, in foreign rules, it is often useful to have it set as absolute path. This originally was achieved using realpath(1). This, however, implies that symbolic links are followed as well, which confuses some compilers if they are not called with correct argv[0]. Therefore, 4e86f756bddca8db402502be47c0825e1e2aeb0d tries to replace this by concatenation with $(pwd), which, however, is only correct for tools brought locally by the toolchain. Hence fix the test by not evaluating it in the shell at all and rather using the knowledge about toolchain versus system tools that the rules have anyway.
2024-06-10Merge branch 'just-rules' into rulesOliver Reiche
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-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-31["CC", "pkg-config"]: support defaultsKlaus Aehlig
2024-05-27Merge branch 'just-rules' into rulesKlaus Aehlig
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-24Merge branch 'just-rules' into rulesKlaus Aehlig
2024-05-24Prefer built-in array access over implementing "first" and "last" using foldlKlaus Aehlig
2024-05-23Merge branch 'just-rules' into rulesKlaus Aehlig
2024-05-23["CC/pkgconfig", "system_library"]: honor shell toolchainKlaus Aehlig
... instead of hard-coding /bin/sh.
2024-05-22CC/foreign: support shell toolchainKlaus Aehlig
2024-05-21Support creating shared lib from object libOliver Reiche
2024-05-21Merge branch 'just-rules' into rulesKlaus Aehlig
2024-05-21["CC/auto", "config"] also honor shell-toolchain-provided PATHKlaus Aehlig
2024-05-15Merge branch 'just-rules' into rulesKlaus 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-13Merge commit '07924d28e81fe36ddb8e020552a7392fcf1227a0' into HEADPaul Cristian Sarbu
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-06Merge commit '3b1d1e390b0de137a32bc5c4a8865e5417b3673b' into HEADKlaus Aehlig
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.