From 2424ba71f24b1d7864cd61268866e0bd0d316544 Mon Sep 17 00:00:00 2001 From: Akos Kiss Date: Thu, 20 Apr 2017 12:42:13 +0200 Subject: [PATCH] OSX-related CMakeLists maintenance (#1750) Disable release binary stripping on OSX: The linker of OSX does not support `-s` for link-time stripping. (The option does not cause an error but clutters build output with warnings.) No OSX-dependent LTO flags: LTO is disabled on OSX. JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu --- CMakeLists.txt | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 77cf992ac..a4bde4ab4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -41,11 +41,12 @@ if(NOT CMAKE_BUILD_TYPE) endif() if("${PLATFORM}" STREQUAL "DARWIN") - set(ENABLE_LTO "OFF") - set(ENABLE_ALL_IN_ONE "ON") - set(JERRY_LIBC "OFF") - set(JERRY_LIBM "OFF") + set(JERRY_LIBC "OFF") + set(JERRY_LIBM "OFF") + set(ENABLE_ALL_IN_ONE "ON") + set(ENABLE_LTO "OFF") set(ENABLE_STATIC_LINK "OFF") + set(ENABLE_STRIP "OFF") endif() @@ -141,9 +142,7 @@ if(ENABLE_LTO) jerry_add_link_flags(-flto) endif() if(USING_GCC) - if(NOT "${PLATFORM}" STREQUAL "DARWIN") - jerry_add_compile_flags(-fno-fat-lto-objects) - endif() + jerry_add_compile_flags(-fno-fat-lto-objects) # Use gcc-ar and gcc-ranlib to support LTO set(CMAKE_AR "gcc-ar") set(CMAKE_RANLIB "gcc-ranlib")