Age | Commit message (Collapse) | Author |
|
* aosp/upstream:
Unspecify VarVisibilityFunc param name s
Add func KATI_visibility_prefix
Change-Id: I2db3c738d41b38189cf4356631a36411c4f72812
|
|
syntax: $(KATI_visibility_prefix var, prefix)
1, Add a func KATI_visibility_prefix that takes a variable
name and a list of strings, set this variable's visibility
to these strings. Each string represents the relative path
from the root, and is considered as prefix.
e.g. $(KATI_visibility_prefix VAR, vendor/ device/b baz.mk)
--> VAR is visible to "vendor/foo.mk", "device/bar.mk",
"device/baz.mk", "baz.mk", but not visible to "bar.mk",
"vendor.mk" or "vendor/baz.mk".
If variable visibility is set more than once, and with a
different list of strings, an error will occur.
2. When a variable is being referenced, if this variable has
visibility prefix set, check if the current referencing file
matches the visibility prefix. Throw an error if not.
3. In $(KATI_visibility_prefix FOO, prefix)
If FOO is not defined, create a variable FOO with empty value.
The prefix can also be reference to variable.
If so, this function will expand the reference and set the
visibility_prefix.
|
|
* aosp/upstream:
Remove .KATI_SYMLINK_OUTPUTS
Install a specific version of ninja in the dockerfile
Enable ninja-validations.sh
Fix CI
Change-Id: I4c01f8978cb76c56e23ac89cfdafd969810f5624
|
|
This was added so that bazel could run ninja files,
but we abandoned that approach a long time ago.
|
|
It was different from what is installed in the github action.
|
|
Update ninja to 1.11.1, which has validation actions,
and enable ninja-validations.sh
|
|
Ubuntu-22.04 (which is what ubuntu-latest is at the time
of writing) now has clang++-14/clang-format-14 instead of
12. Update those and reformat files. Also, make our github
action based on ubuntu-22.04 explicetly so that when latest
changes we don't break again. (Although in scenarios like
this we would still break)
Also change a forward declaration to an include to resolve
a build failure.
|
|
* Already present on aosp/master (with clang-format errors):
Add arbitrary metadata "tag" tracking.
Add KATI_file_no_rerun function
Add KATI_foreach_sep function
* Newly arriving from GitHub/master:
Delete the golang version of kati
* One additional clang-format fixup in src/eval.cc
Change-Id: Id4bcf87dd629b0384a80a4089bfcd90f94e10975
|
|
Allows makefiles to set the `.KATI_TAGS` target specific variable to
annotate arbitrary metadata for the build step for use in profiling.
Bug: http://b/259130368
Test: end-to-end test tracing the time spent running cp for dist
Change-Id: I930a828cc09add1ce13f7e23142e208c9a7ca5fc
|
|
The syntax is the same as $(file), but it will only be run once.
Similar to $(KATI_shell_no_rerun), we want to generate files during
kati, but not regenerate them on every invocation of kati.
Test: unit tests pass
Change-Id: I34b7972a0a9f0540da322a995c30fef2efd16145
|
|
syntax: $(KATI_foreach_sep var,separator,list,text)
Rather than using a space to separate items in the expanded result,
`separator` is used.
comma := ,
v := $(KATI_foreach_sep w,$(comma) ,a b c,"$(w)")
v will be set to: `"a", "b", "c"`
Change-Id: I426d7b24846dc495b9134319dd452809837fe5f9
|
|
The syntax is the same as $(file), but it will only be run once.
Similar to $(KATI_shell_no_rerun), we want to generate files during
kati, but not regenerate them on every invocation of kati.
Test: unit tests pass
Change-Id: I34b7972a0a9f0540da322a995c30fef2efd16145
|
|
syntax: $(KATI_foreach_sep var,separator,list,text)
Rather than using a space to separate items in the expanded result,
`separator` is used.
comma := ,
v := $(KATI_foreach_sep w,$(comma) ,a b c,"$(w)")
v will be set to: `"a", "b", "c"`
Change-Id: I426d7b24846dc495b9134319dd452809837fe5f9
|
|
Allows makefiles to set the `.KATI_TAGS` target specific variable to
annotate arbitrary metadata for the build step for use in profiling.
Bug: http://b/259130368
Test: end-to-end test tracing the time spent running cp for dist
Change-Id: I930a828cc09add1ce13f7e23142e208c9a7ca5fc
|
|
Kati started off development in golang, but then
switched to C++ after it was discovered that go was
too slow. It's no longer used.
|
|
* aosp/upstream:
Add KATI_shell_no_rerun
Add KATI_extra_file_deps function
Merge ckati_stamp_dump into the regular ckati binary
Remove pointers to IfState
Remove ParserState
Change-Id: I63ec0f52bf8a5579084e62981f34b2bd93f8500c
|
|
We want to add the ability for kati to injest starlark
code to android, but we don't want starlark to rerun
on every invocation of kati. Instead, add a
$(KATI_shell_no_rerun) that will run the shell command
when kati regenerates the ninja file, but not when
checking the stamp file. Then, the starlark files can
be added as dependencies with $(KATI_extra_file_deps).
|
|
Calling this function with a list of files will add those
files to the kati stamp, causing kati to rerun if those files
are touched.
This is currently not very useful, because the only ways of
observing files will already record kati stamp entries.
(these being $(file) and $(shell))
However, the next commit will add a usecase for it.
|
|
So that there's fewer binaries to worry about updating.
There's only 1 actual usage of ckati_stamp_dump in android,
so it should be easy to update it when we update ckati in
android.
|
|
IfState structs are always accessed
from if_stack_, so they don't need to
be pointers.
|
|
ParserState was never compared to anything
except for NOT_AFTER_RULE, so it could be
a boolean instead.
|
|
* aosp/upstream:
Fix crash due to std::string_view change
Remove AppendString
Change-Id: Ic53c45ab9e39d378d44fbd8e35637a0be72ad34d
|
|
std::string_view can't accept a null pointer.
|
|
No longer necessary now that we're using std::string_view
|
|
* aosp/upstream:
Replace StringPiece with std::string_view
Remove usages of using namespace std;
Add ninja version of $? test case
Run clang-format
Update AUTHORS
Simplify implementation of $? for ninja
Implement $? for ninja
Add test case for $?
Disable $? in ninja mode
Update AUTHORS and CONTRIBUTORS
Implement $?
Fix tests for ubuntu 22.04
Add workflow_dispatch trigger to github action
Fix CI
Add --variable_assignment_trace_filter option
Fix unqualified-std-cast-call compiler warning
Correct result of Stem()
Change-Id: I056bfb6fc0193aa51728d52c4d06974a462b1a2d
|
|
StringPiece was almost an identical copy of std::string_view,
probably added before kati was compiled with C++17. Replace
it with std::string_view now that we're on C++17.
Some of the differences between StringPiece and std::string_view are:
- myStringPiece.AppendToString(myString) becomes
myString.append(myStringView)
- myStringPiece.as_string() becomes std::string(myStringView)
- string_view doesn't have .clear(), replaced with initializing a new
string_view
- myStringPiece.get(0) becomes myStringView.at(0), with added bounds
checking because string_view will throw if it's out of bounds while
StringPiece will return 0 instead.
- StringPiece's substr() will prevent both the starting and ending
indexes of the substring from going past the end of the StringPiece,
but string_view will only do that for the ending index, and throw
on out of bounds starting indicies.
- StringPiece could be initialized from a null char*, but string_view
will crash when given null.
The tests caught some of the runtime issues, but more were
caught by testing a locally compiled ckati in the android source tree.
|
|
This is mandated by the google style guide:
https://google.github.io/styleguide/cppguide.html
|
|
|
|
|
|
I forgot to add my E-mail address along with my name here.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The version of bash in ubuntu 22.04 says
errors occur on line 1 instead of line 0
when using bash -c. Update the tests
to handle that.
|
|
Add workflow_dispatch trigger to github action
|
|
|
|
Fix unqualified-std-cast-call compiler warning
|
|
|
|
Add --variable_assignment_trace_filter option
|
|
|
|
|
|
In addition, write assignment event to the trace file.
|
|
In addition, write assignment event to the trace file.
Test: build and use it
Change-Id: I6233c4316a48adfa7c58bb10e5379885e6f37242
|
|
Context: https://reviews.llvm.org/D119670
... also fixed a clang-format error.
|
|
|
|
* aosp/upstream:
Switch from vfork to posix_spawn
Fix parallel tests
Update Dockerfile to pass tests
Change-Id: I66fc6e2058ef14e048a64341be90470c6c5d00c6
|
|
Switch from vfork to posix_spawn
|