Skip to content
This repository has been archived by the owner on Aug 5, 2022. It is now read-only.

Commit

Permalink
jerry.cmake: Disable LTO for JerryScript build
Browse files Browse the repository at this point in the history
With LTO compiling enabled, and Zephyr SDk 0.10.0, during final Zephyr
link (which isn't done with LTO option), for armv7m targets, weird
errors are thrown:

zephyr-sdk-0.10.0/arm-zephyr-eabi/.../arm-zephyr-eabi/bin/ld: error:
zephyr_prebuilt.elf uses VFP register arguments, /tmp/ccTrD4ap.ltrans1.ltrans.o does not

Note that both JerryScript and Zephyr seem to be built with correct and
consistent target options, which enable VFP usage.

Disabling LTO option for JerryScript build fixes this issue.

Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
  • Loading branch information
pfalcon committed Apr 26, 2019
1 parent cef5c0d commit 7b75a4f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmake/jerry.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ set(CMAKE_ARGS
-DCMAKE_C_COMPILER_WORKS=TRUE
-DCMAKE_SYSTEM_NAME=Zephyr
-DENABLE_ALL_IN_ONE=OFF
-DENABLE_LTO=ON
-DENABLE_LTO=OFF
-DEXTERNAL_COMPILE_FLAGS=${external_project_cflags}
-DFEATURE_ERROR_MESSAGES=ON
-DFEATURE_DEBUGGER=${DEBUGGER}
Expand Down

0 comments on commit 7b75a4f

Please sign in to comment.