Disable libjerry-math by default (#4428)

Normally, it is more usual and safe to use a toolchain's native
math library. Especially, if multiple components of a project use
math functions, in which case all components should be linked
against the same libm.

The libjerry-math can be used, of course, but as it needs extra
care and consideration, it should be opt-in.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
This commit is contained in:
Akos Kiss
2021-01-08 11:37:46 +01:00
committed by GitHub
parent 0a3aa0f48b
commit d161e2d9ed
8 changed files with 14 additions and 14 deletions
+1 -7
View File
@@ -53,7 +53,7 @@ set(JERRY_CMDLINE_SNAPSHOT OFF CACHE BOOL "Build jerry snapshot command line to
set(JERRY_LIBFUZZER OFF CACHE BOOL "Build jerry with libfuzzer support?")
set(JERRY_PORT_DEFAULT ON CACHE BOOL "Build default jerry port implementation?")
set(JERRY_EXT ON CACHE BOOL "Build jerry-ext?")
set(JERRY_MATH ON CACHE BOOL "Build and use jerry-math?")
set(JERRY_MATH OFF CACHE BOOL "Build and use jerry-math?")
set(UNITTESTS OFF CACHE BOOL "Build unit tests?")
set(DOCTESTS OFF CACHE BOOL "Build doc tests?")
@@ -82,21 +82,17 @@ if(JERRY_CMDLINE OR DOCTESTS)
endif()
if("${PLATFORM}" STREQUAL "DARWIN")
set(JERRY_MATH OFF)
set(ENABLE_LTO OFF)
set(ENABLE_STRIP OFF)
set(JERRY_MATH_MESSAGE " (FORCED BY PLATFORM)")
set(ENABLE_LTO_MESSAGE " (FORCED BY PLATFORM)")
set(ENABLE_STRIP_MESSAGE " (FORCED BY PLATFORM)")
endif()
if("${PLATFORM}" STREQUAL "ESP-IDF")
set(JERRY_MATH OFF)
set(ENABLE_LTO OFF)
set(ENABLE_STRIP OFF)
set(JERRY_MATH_MESSAGE " (FORCED BY PLATFORM)")
set(ENABLE_LTO_MESSAGE " (FORCED BY PLATFORM)")
set(ENABLE_STRIP_MESSAGE " (FORCED BY PLATFORM)")
endif()
@@ -108,10 +104,8 @@ if(USING_TI)
endif()
if(USING_MSVC)
set(JERRY_MATH OFF)
set(ENABLE_STRIP OFF)
set(JERRY_MATH_MESSAGE " (FORCED BY COMPILER)")
set(ENABLE_STRIP_MESSAGE " (FORCED BY COMPILER)")
endif()