blob: 4e64e887216f374fda20f61d60819d97922b646b [file] [log] [blame]
# Copyright 2021 The Fuchsia Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("../libc.gni")
llvm_libc_source_set("fenv") {
functions = [
"feclearexcept",
"feenableexcept",
"feholdexcept",
"feupdateenv",
]
no_test_functions = [
"fedisableexcept",
"fegetenv",
"fegetexcept",
"fegetexceptflag",
"fegetround",
"feraiseexcept",
"fesetenv",
"fesetexcept",
"fesetexceptflag",
"fesetround",
"fetestexcept",
"fetestexceptflag",
]
functions += no_test_functions
test_sources = [
"enabled_exceptions_test.cpp",
"exception_flags_test.cpp",
"exception_status_test.cpp",
"getenv_and_setenv_test.cpp",
"rounding_mode_test.cpp",
]
test_deps = [ ":FEnvSafeTest" ]
# TODO(https://fxbug.dev/42053828): GCC's <arm_acle.h> doesn't provide some
# intrinsics that llvm-libc expects and clang provides. Remove this after
# these have been upstreamed into GCC.
if (is_gcc) {
include_dirs = [ "." ]
}
}
libc_test("FEnvSafeTest") {
dir = "$llvm_libc/test/UnitTest"
public = [ "FEnvSafeTest.h" ]
sources = [ "FEnvSafeTest.cpp" ]
}