From 4f4407121bb52de99be9b00f980a7802a54dcc53 Mon Sep 17 00:00:00 2001 From: Sung-Jae Lee Date: Tue, 1 Dec 2015 14:13:30 +0900 Subject: [PATCH] Disable LTO, Enable ALL_IN_ONE by default in Mac OS X build. JerryScript-DCO-1.0-Signed-off-by: Sung-Jae Lee sjlee@mail.com --- CMakeLists.txt | 2 ++ Makefile | 17 +++++++++++++---- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c33dfdd1d..02fa37163 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -70,6 +70,8 @@ project (Jerry CXX C ASM) option(STRIP_RELEASE_BINARY "Strip symbols from release binaries" ON) elseif("${PLATFORM}" STREQUAL "DARWIN") + option(ENABLE_LTO "Enable LTO build" OFF) + option(ENABLE_ALL_IN_ONE "Enable ALL_IN_ONE build" ON) set(PLATFORM_EXT "DARWIN") set(EXTERNAL_BUILD FALSE) diff --git a/Makefile b/Makefile index cc1ea7010..9b0d57021 100644 --- a/Makefile +++ b/Makefile @@ -41,6 +41,8 @@ # Parallel build of several selected targets started manually is not supported. # +export TARGET_NATIVE_SYSTEMS = $(shell uname -s | tr '[:upper:]' '[:lower:]') + # Options # Valgrind VALGRIND ?= OFF @@ -64,7 +66,11 @@ endif # LTO - LTO ?= ON + ifeq ($(TARGET_NATIVE_SYSTEMS),darwin) + LTO ?= OFF + else + LTO ?= ON + endif ifneq ($(LTO),ON) LTO := OFF @@ -77,7 +83,12 @@ endif # All-in-one build - ALL_IN_ONE ?= OFF + ifeq ($(TARGET_NATIVE_SYSTEMS),darwin) + ALL_IN_ONE ?= ON + else + ALL_IN_ONE ?= OFF + endif + ifneq ($(ALL_IN_ONE),ON) ALL_IN_ONE := OFF endif @@ -91,8 +102,6 @@ QLOG := >/dev/null endif -export TARGET_NATIVE_SYSTEMS = $(shell uname -s | tr '[:upper:]' '[:lower:]') - # External build configuration # Flag, indicating whether to use compiler's default libc (YES / NO) USE_COMPILER_DEFAULT_LIBC ?= NO