diff --git a/jerry-core/CMakeLists.txt b/jerry-core/CMakeLists.txt index 240138f52..92a65baf2 100644 --- a/jerry-core/CMakeLists.txt +++ b/jerry-core/CMakeLists.txt @@ -400,6 +400,11 @@ target_include_directories(${JERRY_CORE_NAME} PRIVATE ${INCLUDE_CORE_PRIVATE}) set(JERRY_CORE_PKGCONFIG_REQUIRES) set(JERRY_CORE_PKGCONFIG_LIBS) +set(JERRY_CORE_PKGCONFIG_CFLAGS) + +if(ENABLE_LTO) + set(JERRY_CORE_PKGCONFIG_CFLAGS "${JERRY_CORE_PKGCONFIG_CFLAGS} -flto") +endif() if(JERRY_LIBM) target_link_libraries(${JERRY_CORE_NAME} jerry-libm) diff --git a/jerry-core/libjerry-core.pc.in b/jerry-core/libjerry-core.pc.in index ed38855cf..977172397 100644 --- a/jerry-core/libjerry-core.pc.in +++ b/jerry-core/libjerry-core.pc.in @@ -9,4 +9,4 @@ Version: 1.0 Requires.private: @JERRY_CORE_PKGCONFIG_REQUIRES@ # NOTE: libjerry-port-default* is not added as a required package Libs: -L${libdir} -ljerry-core Libs.private: @JERRY_CORE_PKGCONFIG_LIBS@ -Cflags: -I${includedir} +Cflags: -I${includedir} @JERRY_CORE_PKGCONFIG_CFLAGS@