mirror of
https://github.com/dart-lang/sdk
synced 2024-11-05 18:22:09 +00:00
877284947b
Like HOST_ARCH_*, HOST_OS_* describes the OS the VM is running on, which may be different from the OS the VM is generating code for during AOT compilation. Currently we conflate the two when emitting AOT as assembly, and we get away with it because Flutter only uses assembly for targeting iOS and one can only target iOS from a Mac, but we expect to use assembly for Android as well so native tools can unwind Dart frames. R=zra@google.com Review-Url: https://codereview.chromium.org/2750843003 .
23 lines
827 B
C++
23 lines
827 B
C++
// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
|
|
// for details. All rights reserved. Use of this source code is governed by a
|
|
// BSD-style license that can be found in the LICENSE file.
|
|
|
|
#ifndef RUNTIME_PLATFORM_MATH_H_
|
|
#define RUNTIME_PLATFORM_MATH_H_
|
|
|
|
// We must take these math functions from the C++ header file as long as we
|
|
// are using the STL. Otherwise the Android build will break due to confusion
|
|
// between C++ and C headers when math.h is also included.
|
|
#if !defined(HOST_OS_FUCHSIA)
|
|
#include <cmath>
|
|
|
|
#define isinf(val) std::isinf(val)
|
|
#define isnan(val) std::isnan(val)
|
|
#define signbit(val) std::signbit(val)
|
|
#define isfinite(val) std::isfinite(val)
|
|
#else
|
|
// TODO(zra): When Fuchsia has STL, do the same thing as above.
|
|
#include <math.h>
|
|
#endif
|
|
|
|
#endif // RUNTIME_PLATFORM_MATH_H_
|