Adding a minimal flag parser. It does most of what we want without any C++ in 3 modes: - entirely disabled (turned into some static variables) - argc/argv parser only for main() - flagfile parsing that uses fopen/fread It also has the nifty property of a round-tripping mode that lets you get all the current flag values and pipe them to a file to then load back in a flagfile, which should make it easier to reproduce flag-dependent configurations. Likely lots of little tweaks remaining (there always are), but this may be enough to start replacing our existing usage of the abseil flags. One thing mostly implemented is callbacks so that we can support lists (multiple instances of a flag on the command line) and actions, which aren't great in abseil flags. Fixes #3814.
diff --git a/build_tools/cmake/iree_lit_test.cmake b/build_tools/cmake/iree_lit_test.cmake index 6d18823..9d18495 100644 --- a/build_tools/cmake/iree_lit_test.cmake +++ b/build_tools/cmake/iree_lit_test.cmake
@@ -54,11 +54,13 @@ return() endif() + iree_package_ns(_PACKAGE_NS) iree_package_name(_PACKAGE_NAME) set(_NAME "${_PACKAGE_NAME}_${_RULE_NAME}") get_filename_component(_TEST_FILE_PATH ${_RULE_TEST_FILE} ABSOLUTE) + list(TRANSFORM _RULE_DATA REPLACE "^::" "${_PACKAGE_NS}::") set(_DATA_DEP_PATHS) foreach(_DATA_DEP ${_RULE_DATA}) string(REPLACE "::" "_" _DATA_DEP_NAME ${_DATA_DEP})