[EFL] Make FTL buildable

https://bugs.webkit.org/show_bug.cgi?id=125777

Patch by Dániel Bátyai <dbatyai.u-szeged@partner.samsung.com> on 2014-01-08
Reviewed by Csaba Osztrogonác.

.:

* Source/cmake/OptionsEfl.cmake:
* Source/cmakeconfig.h.cmake:

Source/JavaScriptCore:

* CMakeLists.txt:
* ftl/FTLOSREntry.cpp:
* ftl/FTLOSRExitCompiler.cpp:
* llvm/library/config_llvm.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161498 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 36d77e02
2014-01-08 Dániel Bátyai <dbatyai.u-szeged@partner.samsung.com>
[EFL] Make FTL buildable
https://bugs.webkit.org/show_bug.cgi?id=125777
Reviewed by Csaba Osztrogonác.
* Source/cmake/OptionsEfl.cmake:
* Source/cmakeconfig.h.cmake:
2014-01-08 Alberto Garcia <berto@igalia.com>
REGRESSION(r160304): [GTK] Disable libtool fast install
......
......@@ -16,6 +16,7 @@ set(JavaScriptCore_INCLUDE_DIRECTORIES
"${JAVASCRIPTCORE_DIR}/interpreter"
"${JAVASCRIPTCORE_DIR}/jit"
"${JAVASCRIPTCORE_DIR}/llint"
"${JAVASCRIPTCORE_DIR}/llvm"
"${JAVASCRIPTCORE_DIR}/parser"
"${JAVASCRIPTCORE_DIR}/profiler"
"${JAVASCRIPTCORE_DIR}/runtime"
......@@ -576,6 +577,81 @@ if (ENABLE_LLINT)
)
endif ()
if (ENABLE_FTL_JIT)
if (NOT LLVM_STATIC_LIBRARIES)
message(FATAL_ERROR "No LLVM libs found, but FTL is enabled. Stopping build.")
endif ()
# Configure llvmForJSC.so
set(llvmForJSC_SOURCES
llvm/library/LLVMAnchor.cpp
llvm/library/LLVMExports.cpp
llvm/library/LLVMOverrides.cpp
)
set(llvmForJSC_INCLUDE_DIRECTORIES
${LLVM_INCLUDE_DIRS}
"${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}"
)
add_custom_command(
OUTPUT ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/WebKitLLVMLibraryToken.h
DEPENDS ${LLVM_STATIC_LIBRARIES}
COMMAND ${CMAKE_COMMAND} -E touch ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/WebKitLLVMLibraryToken.h
VERBATIM)
WEBKIT_WRAP_SOURCELIST(${llvmForJSC_SOURCES})
add_library(llvmForJSC SHARED ${llvmForJSC_SOURCES} ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/WebKitLLVMLibraryToken.h)
target_link_libraries(llvmForJSC ${LLVM_STATIC_LIBRARIES} "pthread" "dl")
# Added extra items for JavaScriptCore
list(APPEND JavaScriptCore_INCLUDE_DIRECTORIES
${LLVM_INCLUDE_DIRS}
)
list(APPEND JavaScriptCore_SOURCES
llvm/InitializeLLVM.cpp
llvm/InitializeLLVMPOSIX.cpp
llvm/InitializeLLVMLinux.cpp
llvm/LLVMAPI.cpp
dfg/DFGToFTLDeferredCompilationCallback.cpp
dfg/DFGToFTLForOSREntryDeferredCompilationCallback.cpp
disassembler/LLVMDisassembler.cpp
disassembler/X86Disassembler.cpp
ftl/FTLAbstractHeap.cpp
ftl/FTLAbstractHeapRepository.cpp
ftl/FTLCapabilities.cpp
ftl/FTLCommonValues.cpp
ftl/FTLCompile.cpp
ftl/FTLExitArgument.cpp
ftl/FTLExitArgumentForOperand.cpp
ftl/FTLExitThunkGenerator.cpp
ftl/FTLExitValue.cpp
ftl/FTLFail.cpp
ftl/FTLForOSREntryJITCode.cpp
ftl/FTLInlineCacheSize.cpp
ftl/FTLIntrinsicRepository.cpp
ftl/FTLJITCode.cpp
ftl/FTLJITFinalizer.cpp
ftl/FTLLink.cpp
ftl/FTLLocation.cpp
ftl/FTLLowerDFGToLLVM.cpp
ftl/FTLOSREntry.cpp
ftl/FTLOSRExit.cpp
ftl/FTLOSRExitCompiler.cpp
ftl/FTLOutput.cpp
ftl/FTLSaveRestore.cpp
ftl/FTLSlowPathCall.cpp
ftl/FTLSlowPathCallKey.cpp
ftl/FTLStackMaps.cpp
ftl/FTLState.cpp
ftl/FTLThunks.cpp
ftl/FTLValueFormat.cpp
)
endif ()
set(HASH_LUT_GENERATOR ${CMAKE_CURRENT_SOURCE_DIR}/create_hash_table)
macro(GENERATE_HASH_LUT _input _output)
add_custom_command(
......@@ -596,7 +672,6 @@ set(JavaScriptCore_FORWARDING_HEADERS_DIRECTORIES
assembler
bindings
bytecode
collector/handles
debugger
heap
inspector
......@@ -607,6 +682,8 @@ set(JavaScriptCore_FORWARDING_HEADERS_DIRECTORIES
profiler
runtime
yarr
collector/handles
)
set(JavaScriptCore_FORWARDING_HEADERS_FILES
......@@ -771,3 +848,7 @@ if (${JavaScriptCore_LIBRARY_TYPE} STREQUAL "SHARED")
set_target_properties(JavaScriptCore PROPERTIES VERSION ${JAVASCRIPTCORE_VERSION} SOVERSION ${JAVASCRIPTCORE_VERSION_MAJOR})
install(TARGETS JavaScriptCore DESTINATION "${LIB_INSTALL_DIR}")
endif ()
if (ENABLE_FTL_JIT)
add_dependencies(JavaScriptCore llvmForJSC)
endif ()
2014-01-08 Dániel Bátyai <dbatyai.u-szeged@partner.samsung.com>
[EFL] Make FTL buildable
https://bugs.webkit.org/show_bug.cgi?id=125777
Reviewed by Csaba Osztrogonác.
* CMakeLists.txt:
* ftl/FTLOSREntry.cpp:
* ftl/FTLOSRExitCompiler.cpp:
* llvm/library/config_llvm.h:
2014-01-08 Zan Dobersek <zdobersek@igalia.com>
[Automake] Scripts for generated build targets do not necessarily produce their output
......
/*
* Copyright (C) 2013 University of Szeged. All rights reserved.
* Copyright (C) 2013 Samsung Electronics. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY UNIVERSITY OF SZEGED. ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "config.h"
#include "InitializeLLVM.h"
#if HAVE(LLVM)
#include "InitializeLLVMPOSIX.h"
namespace JSC {
void initializeLLVMImpl()
{
initializeLLVMPOSIX("libllvmForJSC.so");
}
} // namespace JSC
#endif // HAVE(LLVM)
......@@ -23,6 +23,11 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#if defined(HAVE_CONFIG_H) && HAVE_CONFIG_H
#ifdef BUILDING_WITH_CMAKE
#include "cmakeconfig.h"
#endif
#endif
#include <wtf/Platform.h>
#include <wtf/ExportMacros.h>
#
# Check if the llvm-config gives us the path for the llvm libs.
#
# The following variables are set:
# LLVM_CONFIG_EXE
# LLVM_VERSION
# LLVM_INCLUDE_DIRS - include directories for the llvm headers.
# LLVM_STATIC_LIBRARIES - list of paths for the static llvm libraries.
find_program(LLVM_CONFIG_EXE NAMES "llvm-config")
execute_process(COMMAND ${LLVM_CONFIG_EXE} --version OUTPUT_VARIABLE LLVM_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE)
execute_process(COMMAND ${LLVM_CONFIG_EXE} --includedir OUTPUT_VARIABLE LLVM_INCLUDE_DIRS OUTPUT_STRIP_TRAILING_WHITESPACE)
execute_process(COMMAND ${LLVM_CONFIG_EXE} --libfiles OUTPUT_VARIABLE LLVM_STATIC_LIBRARIES OUTPUT_STRIP_TRAILING_WHITESPACE)
# convert the list of paths into a cmake list
separate_arguments(LLVM_STATIC_LIBRARIES)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(LLVM DEFAULT_MSG
LLVM_VERSION LLVM_INCLUDE_DIRS LLVM_STATIC_LIBRARIES)
mark_as_advanced(LLVM_VERSION LLVM_INCLUDE_DIRS LLVM_STATIC_LIBRARIES)
......@@ -281,3 +281,8 @@ if (ENABLE_INDEXED_DATABASE)
set(WTF_USE_LEVELDB 1)
add_definitions(-DWTF_USE_LEVELDB=1)
endif ()
if (ENABLE_FTL_JIT)
find_package(LLVM REQUIRED)
set(HAVE_LLVM ON)
endif ()
......@@ -42,6 +42,7 @@
#cmakedefine01 ENABLE_FILTERS
#cmakedefine01 ENABLE_FIXED_REPORTED_SIZE
#cmakedefine01 ENABLE_FTPDIR
#cmakedefine01 ENABLE_FTL_JIT
#cmakedefine01 ENABLE_FONT_LOAD_EVENTS
#cmakedefine01 ENABLE_FULLSCREEN_API
#cmakedefine01 ENABLE_GAMEPAD
......@@ -125,5 +126,6 @@
#cmakedefine01 ENABLE_XSLT
#cmakedefine01 USE_SYSTEM_MALLOC
#cmakedefine01 WTF_USE_TILED_BACKING_STORE
#cmakedefine01 HAVE_LLVM
#endif /* CMAKECONFIG_H */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment