blob: 3243750fc7598996ea94ac476624ce163ab1f710 [file] [log] [blame]
# Copyright 2018 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.
#
# The original Makefile also specifies -fwrapv.
deps -= [ "$zx/public/gn/config:opt_level" ]
cflags = [
"-O0",
"-fwrapv",
]
}