This is an archive of the discontinued LLVM Phabricator instance.

[libc][bazel] add targets for sprintf
ClosedPublic

Authored by michaelrj on Mar 14 2023, 3:11 PM.

Details

Summary

The bazel build is currently overlay mode only, so the FILE functions
are still out of reach for it, but sprintf only uses strings. This adds
targets for sprintf, snprintf, and all the interal printf pieces, as
well as tests.

Diff Detail

Event Timeline

michaelrj created this revision.Mar 14 2023, 3:11 PM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptMar 14 2023, 3:11 PM
michaelrj requested review of this revision.Mar 14 2023, 3:11 PM
lntue accepted this revision.Mar 16 2023, 6:05 PM

Did you try to run bazel with layering-check ?

This revision is now accepted and ready to land.Mar 16 2023, 6:05 PM
sivachandra accepted this revision.Mar 16 2023, 8:08 PM

LGTM modulo answer to @lntue's question.

based on this patch https://reviews.llvm.org/D143678 it looks like layering check is on by default for all bazel builds. I also tried specifying it manually, and it passed both.

This revision was automatically updated to reflect the committed changes.