blob: 1d6843ab72b9ca67d95a4336f2931b79e2ffa7c9 [file] [log] [blame]
# Copyright 2019 The Fuchsia Authors
#
# Use of this source code is governed by a MIT-style
# license that can be found in the LICENSE file or at
# https://opensource.org/licenses/MIT
library("jitterentropy") {
kernel = true
sources = [
"jitterentropy-base.c",
]
include_dirs = [ "arch/$zircon_cpu" ]
# According to its documentation, jitterentropy must be compiled at
# optimization level -O0.
#
# TODO(SEC-14): Test the code generated at various optimization
# levels. If there is a significant difference in entropy quality,
# replace the relevant C code by assembly code to protect against future
# compiler changes.
configs -= [ "$zx/public/gn/config:opt_level" ]
configs += [ ":config" ]
}
config("config") {
visibility = [ ":*" ]
cflags = [
"-O0",
# The original Makefile also specifies -fwrapv.
"-fwrapv",
]
}