Closed mid-kid closed 3 years ago
Same with fmt::fmt
. I don't even have that installed.
pcre2
is used by selinux/libselinux/src/regex.{c,h}
, but all includes of regex.h
that are used in this subset, are mostly no-op-ish, but maintaining a patch set to keep this clean is probably more work, than just requiring it at compile time.
The fmt::fmt
seems to actually not be used anymore in any of our used code parts, so it should be safe to drop.
I see. Then libpcre is just a build-time dep, just like gtest. I wonder if providing a mock header would work as well, here.
Isn't fmt::fmt
used in core/fastboot/vendor_boot_img_utils.cpp
?
vendor/libbase/include/android-base/format.h
should also require libfmt. I think neither pcre2 nor libfmt can be removed. I don't think mocking headers are worth the effort.
But libfmt isn't even installed and it builds/runs fine... Keep in mind that not all of the files included within the vendor folder are actually used by the build system. Also it feels silly to require a dependency that never actually gets linked/used during runtime, though pcre isn't a massive deal I guess.
Which version of android-tools are you referring to? Git HEAD? Because git HEAD does not build without fmt:
/home/nmeum/src/android-tools/vendor/libbase/include/android-base/format.h:23:10: fatal error: fmt/chrono.h: No such file or directory
23 | #include <fmt/chrono.h>
| ^~~~~~~~~~~~~~
compilation terminated.
platform-tools-31.0.0p1-r1 does not require fmt though.
I was referring to the latest github release, but thanks, good to know.
Ah, the fmt dependency is about to be introduced with the upcoming platform-tools-31.0.2 release. Next time just mention which version you are referring to :)
For some reason I'm building 31.0.2 without libfmt without issues still... There's no fmt/chrono.h in my /usr/include EDIT: Nvm, just noticed it's vendored.
Yes, because it is vendored now, see #40.
What it says on the tin. It seems to link and function fine without
pcre2-8
in the target_include_libraries.