Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
In this way, the test action gets canonical, so adding RUNS_PER_TEST
support to this rule should be easily mergable into downstream rules.
|
|
... also for non-service libraries; the generated .ph.h files
may well refer, e.g., the well-known protos.
|
|
If we have a provided toolchain, we stage it to the corresponding subdirectory.
Otherwise, we still have to provide a value of the correct type (a map) rather
than the default else (which is the empty list).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Backport of commits a382b308b9011606e7d07376808812d51631d558
and 5ae5134804b6edaaffec593868f133dd840ef7df from the
rules-cc repository.
|
|
Backport of commit 4a8579a2a4ef252644df0c29893e70ad8438ae82
from the rules-cc repository.
|
|
|
|
|
|
...starting from a template (aka configuration file), and using the
variables defined via a ["CC/auto", "config"] target.
For example, to use a CMake configuration file, the targets could be
defined as follows
...
, "foo-header-blueprint":
{ "type": ["@", "rules", "CC/auto", "config_file"]
, "input": ["config.hpp.in"]
, "output": ["config.hpp"]
, "stage": ["foo"]
, "magic_string": ["cmakedefine"]
, "@only": ["true"]
}
, "foo-header":
{ "type": "configure"
, "target": "foo-header-blueprint"
, "config":
{ "type": "let*"
, "bindings":
[ [ "defines"
, [ ["var", "\"string value\""]
, ["FOO_MAJOR_VERSION", "3"]
, ["use_this_feature", true]
]
]
]
, "body": {"type": "env", "vars": ["defines"]}
}
}
...
The file config.hpp.in may look as follows
#ifndef config_cmake
#define config_cmake
#cmakedefine var
#cmakedefine use_this_feature
#cmakedefine01 use_this_feature
#cmakedefine unused
#define FOO_VERSION @FOO_MAJOR_VERSION@
#define DONT_TOUCH_THIS ${FOO_MAJOR_VERSION}
#endif
and the generated configuration file foo/config.hpp is
#ifndef config_cmake
#define config_cmake
#define var "string value"
#define use_this_feature
#define use_this_feature 1
/* #undef unused */
#define FOO_VERSION 3
#define DONT_TOUCH_THIS ${FOO_MAJOR_VERSION}
#endif
|
|
Co-authored-by: Sascha Roloff <sascha.roloff@huawei.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Compared to the previous commit, the action graphs for just
and its unit tests are unchanged.
- Git hash of action graph for ["",""]:
c6e75f17abd7ffaab6ff9bb725ad67ec0bf6c973
- Git hash of action graph for ["test/buildtool","TESTS"]:
8063dfb3dd7daa9ae01d95c177e14946f785c57e
Refactor:
- "local cflags" to "private-cflags"
- "local defines" to "private-defines"
- "link externals" to "private-ldflags"
- "deps" to "private-deps" for (test) binaries
- "proto" to "private-proto" for binaries
Improvements:
- consistent variable declaration order:
OS, ARCH, HOST_ARCH, TARGET_ARCH,
CC, CXX, CFLAGS, CXXFLAGS, ADD_CFLAGS, ADD_CXXFLAGS,
AR, ENV, PATH
- use fields close to their definition (in RULES)
- use common expression for binaries and test binaries
- split expression "flags" and "compiler"
... to separate ones for CC and CXX.
- rename "transition" to "deps-transition"
... to avoid conflicts with other transitions.
- support "defaults-transition" for CC expressions
Implement:
- "cflags" for libraries
- "private-cflags" for (test) binaries
- "private-defines" for test binaries
- "private-ldflags" for test binaries
- (public) "defines" for libraries
|
|
... in favor of the "tree" built-in rule.
|
|
... which is required for cross-compilation, e.g., clang's
`-target` option.
|
|
i.e., libraries that are used only in the implementation without
use in the public header files. In this way, the set of headers
exposed to dependencies can be reduced leading potentially to better
incrementality.
|
|
|
|
|
|
|
|
The test runner is supposed to report the reult in a file
called 'result' in the top-level action directory. However,
before starting the actual test, it changes the working
directory to the subdir 'work' where the input of the test
action is located. Therefore, when reporting the result,
the correct file name is '../result'. Fix this.
|
|
|
|
|
|
|
|
Signed-off-by: Goetz Brasche <goetz.brasche@huawei.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
... in a latest-wins fashion. The intended use case is overlaying
globs with individual patched files.
|