mirror of
https://github.com/FEX-Emu/FEX.git
synced 2025-02-15 04:17:40 +00:00
Fixes jemalloc library ordering
FEXCore relies on jemalloc symbols if compiled with it. Have FEXCore link to jemalloc instead of the frontend. Fixes a missing symbol if someone loads libFEXCore Additionally, stop trying to compile JEMalloc if not enabled
This commit is contained in:
parent
97f413cfec
commit
b15e0c5f6c
@ -225,6 +225,8 @@ endif()
|
||||
|
||||
if (ENABLE_JEMALLOC)
|
||||
add_definitions(-DENABLE_JEMALLOC=1)
|
||||
add_subdirectory(External/jemalloc/)
|
||||
include_directories(External/jemalloc/pregen/include/)
|
||||
else()
|
||||
message (STATUS
|
||||
" jemalloc disabled!\n"
|
||||
@ -260,9 +262,6 @@ endif()
|
||||
add_definitions(-Wno-trigraphs)
|
||||
add_definitions(-DGLOBAL_DATA_DIRECTORY="${DATA_DIRECTORY}/")
|
||||
|
||||
add_subdirectory(External/jemalloc/)
|
||||
include_directories(External/jemalloc/pregen/include/)
|
||||
|
||||
add_subdirectory(External/cpp-optparse/)
|
||||
include_directories(External/cpp-optparse/)
|
||||
|
||||
|
9
External/FEXCore/Source/CMakeLists.txt
vendored
9
External/FEXCore/Source/CMakeLists.txt
vendored
@ -184,6 +184,11 @@ if (ENABLE_JITSYMBOLS)
|
||||
list(APPEND DEFINES -DENABLE_JITSYMBOLS=1)
|
||||
endif()
|
||||
|
||||
set (LIBS vixl dl fmt::fmt xxhash tiny-json)
|
||||
if (ENABLE_JEMALLOC)
|
||||
list (APPEND LIBS FEX_jemalloc)
|
||||
endif()
|
||||
|
||||
# Generate IR include file
|
||||
set(OUTPUT_IR_FOLDER "${CMAKE_BINARY_DIR}/include/FEXCore/IR")
|
||||
set(OUTPUT_NAME "${OUTPUT_IR_FOLDER}/IRDefines.inc")
|
||||
@ -270,7 +275,7 @@ function(AddObject Name Type)
|
||||
add_dependencies(${Name} IR_INC)
|
||||
add_dependencies(${Name} CONFIG_INC)
|
||||
|
||||
target_link_libraries(${Name} vixl dl fmt::fmt xxhash)
|
||||
target_link_libraries(${Name} ${LIBS})
|
||||
set_target_properties(${Name} PROPERTIES OUTPUT_NAME FEXCore)
|
||||
set_target_properties(${Name} PROPERTIES C_VISIBILITY_PRESET hidden)
|
||||
set_target_properties(${Name} PROPERTIES CXX_VISIBILITY_PRESET hidden)
|
||||
@ -311,7 +316,7 @@ endfunction()
|
||||
|
||||
function(AddLibrary Name Type)
|
||||
add_library(${Name} ${Type} $<TARGET_OBJECTS:${PROJECT_NAME}_object>)
|
||||
target_link_libraries(${Name} vixl dl fmt::fmt xxhash tiny-json)
|
||||
target_link_libraries(${Name} ${LIBS})
|
||||
set_target_properties(${Name} PROPERTIES OUTPUT_NAME FEXCore)
|
||||
set_target_properties(${Name} PROPERTIES C_VISIBILITY_PRESET hidden)
|
||||
set_target_properties(${Name} PROPERTIES CXX_VISIBILITY_PRESET hidden)
|
||||
|
@ -1,9 +1,5 @@
|
||||
add_subdirectory(LinuxSyscalls)
|
||||
|
||||
if (ENABLE_JEMALLOC)
|
||||
set (LIBS FEX_jemalloc)
|
||||
endif()
|
||||
|
||||
list(APPEND LIBS FEXCore Common CommonCore)
|
||||
|
||||
add_executable(FEXLoader FEXLoader.cpp)
|
||||
|
Loading…
x
Reference in New Issue
Block a user