aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2 daysMerge remote-tracking branch 'aosp/upstream' into kvHEADmastermainmrziwang
* aosp/upstream: Unspecify VarVisibilityFunc param name s Add func KATI_visibility_prefix Change-Id: I2db3c738d41b38189cf4356631a36411c4f72812
3 daysAdd func KATI_visibility_prefixZi Wang
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.
2024-01-19Merge remote-tracking branch 'aosp/upstream' into update_katiCole Faust
* aosp/upstream: Remove .KATI_SYMLINK_OUTPUTS Install a specific version of ninja in the dockerfile Enable ninja-validations.sh Fix CI Change-Id: I4c01f8978cb76c56e23ac89cfdafd969810f5624
2024-01-19Remove .KATI_SYMLINK_OUTPUTSCole Faust
This was added so that bazel could run ninja files, but we abandoned that approach a long time ago.
2024-01-19Install a specific version of ninja in the dockerfileCole Faust
It was different from what is installed in the github action.
2023-10-05Enable ninja-validations.shCole Faust
Update ninja to 1.11.1, which has validation actions, and enable ninja-validations.sh
2023-10-05Fix CICole Faust
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.
2023-06-22Merge GitHub 'master' branch.LaMont Jones
* 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
2023-06-21Add arbitrary metadata "tag" tracking.Dan Albert
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
2023-06-21Add KATI_file_no_rerun functionLaMont Jones
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
2023-06-21Add KATI_foreach_sep functionLaMont Jones
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
2023-06-16Add KATI_file_no_rerun functionLaMont Jones
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
2023-06-16Add KATI_foreach_sep functionLaMont Jones
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
2023-06-15Add arbitrary metadata "tag" tracking.Dan Albert
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
2023-06-15Delete the golang version of katiCole Faust
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.
2023-05-05Merge remote-tracking branch 'aosp/upstream' into update_kati_2Cole Faust
* 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
2023-05-05Add KATI_shell_no_rerunCole Faust
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).
2023-05-05Add KATI_extra_file_deps functionCole Faust
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.
2023-05-03Merge ckati_stamp_dump into the regular ckati binaryCole Faust
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.
2023-01-31Remove pointers to IfStateCole Faust
IfState structs are always accessed from if_stack_, so they don't need to be pointers.
2023-01-31Remove ParserStateCole Faust
ParserState was never compared to anything except for NOT_AFTER_RULE, so it could be a boolean instead.
2023-01-18Merge remote-tracking branch 'aosp/upstream' into update_katiCole Faust
* aosp/upstream: Fix crash due to std::string_view change Remove AppendString Change-Id: Ic53c45ab9e39d378d44fbd8e35637a0be72ad34d
2023-01-18Fix crash due to std::string_view changeCole Faust
std::string_view can't accept a null pointer.
2023-01-13Remove AppendStringCole Faust
No longer necessary now that we're using std::string_view
2023-01-11Merge remote-tracking branch 'aosp/upstream' into update_katiCole Faust
* 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
2022-12-08Replace StringPiece with std::string_viewCole Faust
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.
2022-11-30Remove usages of using namespace std;Cole Faust
This is mandated by the google style guide: https://google.github.io/styleguide/cppguide.html
2022-11-28Add ninja version of $? test caseDelilah Hoare
2022-11-28Run clang-formatDelilah Hoare
2022-11-28Update AUTHORSDelilah Hoare
I forgot to add my E-mail address along with my name here.
2022-11-28Simplify implementation of $? for ninjaDelilah Hoare
2022-11-28Implement $? for ninjaDelilah Hoare
2022-11-28Add test case for $?Delilah Hoare
2022-11-28Disable $? in ninja modeDelilah Hoare
2022-11-28Update AUTHORS and CONTRIBUTORSDelilah Hoare
2022-11-28Implement $?Delilah Hoare
2022-11-27Fix tests for ubuntu 22.04Cole Faust
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.
2022-11-25Merge pull request #256 from Colecf/workflow_dispatchCole Faust
Add workflow_dispatch trigger to github action
2022-11-25Add workflow_dispatch trigger to github actionCole Faust
2022-11-17Merge pull request #251 from kongy/masterCole Faust
Fix unqualified-std-cast-call compiler warning
2022-11-17Merge remote-tracking branch 'upstream/master'Cole Faust
2022-11-17Merge pull request #254 from asmundak/masterCole Faust
Add --variable_assignment_trace_filter option
2022-11-17Merge branch 'google:master' into masterasmundak
2022-11-09Fix CICole Faust
2022-10-31Add --variable_assignment_trace_filter optionSasha Smundak
In addition, write assignment event to the trace file.
2022-10-28Add --variable_assignment_trace_filter optionSasha Smundak
In addition, write assignment event to the trace file. Test: build and use it Change-Id: I6233c4316a48adfa7c58bb10e5379885e6f37242
2022-08-31Fix unqualified-std-cast-call compiler warningYi Kong
Context: https://reviews.llvm.org/D119670 ... also fixed a clang-format error.
2022-03-14Correct result of Stem()Delilah Hoare
2021-12-07Merge remote-tracking branch 'aosp/upstream'Dan Willemsen
* aosp/upstream: Switch from vfork to posix_spawn Fix parallel tests Update Dockerfile to pass tests Change-Id: I66fc6e2058ef14e048a64341be90470c6c5d00c6
2021-11-16Merge pull request #241 from danw/posix_spawnDan Willemsen
Switch from vfork to posix_spawn