[all-commits] [llvm/llvm-project] 3064dd: [libcxx] Use Fuchsia-native CPRNG for std::random_...

Roland McGrath via All-commits all-commits at lists.llvm.org
Tue Jan 4 10:24:40 PST 2022

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3064dd8ccffc561e0f01cfa930b9a481d90e7f4f
  Author: Roland McGrath <mcgrathr at google.com>
  Date:   2022-01-04 (Tue, 04 Jan 2022)

  Changed paths:
    M libcxx/include/__config
    M libcxx/src/random.cpp

  Log Message:
  [libcxx] Use Fuchsia-native CPRNG for std::random_device

Use the zx_cprng_draw system call directly rather than going
through the libc getentropy function.  The libc function is a
trivial wrapper around the system call, and is not a standard C
function.  Avoiding it reduces the Fuchsia libc ABI surface that
libc++ depends on.

Reviewed By: #libc, ldionne

Differential Revision: https://reviews.llvm.org/D116498

More information about the All-commits mailing list