blob: 4d04b15775efa274ba33c1d2526f8353deb2a7a9 [file] [log] [blame]
# Copyright 2019 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.
source_set("math") {
include_dirs = [ "$zx/third_party/ulib/musl/third_party/include" ]
sources = [
"__expo2.c",
"__expo2f.c",
"__fpclassify.c",
"__fpclassifyf.c",
"__fpclassifyl.c",
"__invtrigl.c",
"__signbit.c",
"__signbitf.c",
"__signbitl.c",
"acosh.c",
"acoshf.c",
"acoshl.c",
"asinh.c",
"asinhf.c",
"asinhl.c",
"atanh.c",
"atanhf.c",
"atanhl.c",
"ceil.c",
"ceilf.c",
"copysign.c",
"copysignf.c",
"copysignl.c",
"cosh.c",
"coshf.c",
"coshl.c",
"cosl.c",
"exp10.c",
"exp10f.c",
"exp10l.c",
"fdim.c",
"fdimf.c",
"fdiml.c",
"finite.c",
"finitef.c",
"floor.c",
"floorf.c",
"fmax.c",
"fmaxf.c",
"fmaxl.c",
"fmin.c",
"fminf.c",
"fminl.c",
"fmod.c",
"fmodf.c",
"frexp.c",
"frexpf.c",
"frexpl.c",
"hypot.c",
"hypotf.c",
"hypotl.c",
"ilogb.c",
"ilogbf.c",
"ilogbl.c",
"ldexp.c",
"ldexpf.c",
"ldexpl.c",
"lgamma.c",
"lgammaf.c",
"llround.c",
"llroundf.c",
"llroundl.c",
"logb.c",
"logbf.c",
"logbl.c",
"lround.c",
"lroundf.c",
"lroundl.c",
"modf.c",
"modff.c",
"modfl.c",
"nan.c",
"nanf.c",
"nanl.c",
"nearbyint.c",
"nearbyintf.c",
"nearbyintl.c",
"nextafter.c",
"nextafterf.c",
"nextafterl.c",
"nexttoward.c",
"nexttowardf.c",
"nexttowardl.c",
"remainder.c",
"remainderf.c",
"remquo.c",
"remquof.c",
"remquol.c",
"rint.c",
"rintf.c",
"round.c",
"roundf.c",
"roundl.c",
"scalbln.c",
"scalblnf.c",
"scalblnl.c",
"scalbn.c",
"scalbnf.c",
"scalbnl.c",
"signgam.c",
"significand.c",
"significandf.c",
"sincosl.c",
"sinh.c",
"sinhf.c",
"sinhl.c",
"sinl.c",
"tanh.c",
"tanhf.c",
"tanhl.c",
"tanl.c",
"tgamma.c",
"tgammaf.c",
"trunc.c",
"truncf.c",
]
if (current_cpu == "x64") {
sources += [
"x86_64/__invtrigl.S",
"x86_64/acosl.S",
"x86_64/asinl.S",
"x86_64/atan2l.S",
"x86_64/atanl.S",
"x86_64/ceill.S",
"x86_64/exp2l.S",
"x86_64/expl.S",
"x86_64/expm1l.S",
"x86_64/fabs.S",
"x86_64/fabsf.S",
"x86_64/fabsl.S",
"x86_64/floorl.S",
"x86_64/fmodl.S",
"x86_64/llrint.S",
"x86_64/llrintf.S",
"x86_64/llrintl.S",
"x86_64/log10l.S",
"x86_64/log1pl.S",
"x86_64/log2l.S",
"x86_64/logl.S",
"x86_64/lrint.S",
"x86_64/lrintf.S",
"x86_64/lrintl.S",
"x86_64/remainderl.S",
"x86_64/rintl.S",
"x86_64/sqrt.S",
"x86_64/sqrtf.S",
"x86_64/sqrtl.S",
"x86_64/truncl.S",
]
} else {
sources += [
"ceill.c",
"fabsl.c",
"floorl.c",
"fmodl.c",
"llrint.c",
"llrintf.c",
"llrintl.c",
"lrint.c",
"lrintf.c",
"lrintl.c",
"remainderl.c",
"rintl.c",
"sqrtl.c",
"truncl.c",
]
}
if (current_cpu == "arm64") {
sources += [
"aarch64/fabs.S",
"aarch64/fabsf.S",
"aarch64/sqrt.S",
"aarch64/sqrtf.S",
]
}
deps = [
"$zx/third_party/ulib/musl:musl_internal",
"$zx/third_party/ulib/musl/third_party/math",
]
}