Skip to content

Commit 4f44071

Browse files
committed
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
1 parent 2c3c952 commit 4f44071

File tree

2 files changed

+15
-4
lines changed

2 files changed

+15
-4
lines changed

CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,8 @@ project (Jerry CXX C ASM)
7070

7171
option(STRIP_RELEASE_BINARY "Strip symbols from release binaries" ON)
7272
elseif("${PLATFORM}" STREQUAL "DARWIN")
73+
option(ENABLE_LTO "Enable LTO build" OFF)
74+
option(ENABLE_ALL_IN_ONE "Enable ALL_IN_ONE build" ON)
7375
set(PLATFORM_EXT "DARWIN")
7476
set(EXTERNAL_BUILD FALSE)
7577

Makefile

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@
4141
# Parallel build of several selected targets started manually is not supported.
4242
#
4343

44+
export TARGET_NATIVE_SYSTEMS = $(shell uname -s | tr '[:upper:]' '[:lower:]')
45+
4446
# Options
4547
# Valgrind
4648
VALGRIND ?= OFF
@@ -64,7 +66,11 @@
6466
endif
6567

6668
# LTO
67-
LTO ?= ON
69+
ifeq ($(TARGET_NATIVE_SYSTEMS),darwin)
70+
LTO ?= OFF
71+
else
72+
LTO ?= ON
73+
endif
6874

6975
ifneq ($(LTO),ON)
7076
LTO := OFF
@@ -77,7 +83,12 @@
7783
endif
7884

7985
# All-in-one build
80-
ALL_IN_ONE ?= OFF
86+
ifeq ($(TARGET_NATIVE_SYSTEMS),darwin)
87+
ALL_IN_ONE ?= ON
88+
else
89+
ALL_IN_ONE ?= OFF
90+
endif
91+
8192
ifneq ($(ALL_IN_ONE),ON)
8293
ALL_IN_ONE := OFF
8394
endif
@@ -91,8 +102,6 @@
91102
QLOG := >/dev/null
92103
endif
93104

94-
export TARGET_NATIVE_SYSTEMS = $(shell uname -s | tr '[:upper:]' '[:lower:]')
95-
96105
# External build configuration
97106
# Flag, indicating whether to use compiler's default libc (YES / NO)
98107
USE_COMPILER_DEFAULT_LIBC ?= NO

0 commit comments

Comments
 (0)