-
Notifications
You must be signed in to change notification settings - Fork 35
compile utils and Base Alloc as static libs #1324
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Copyright (C) 2025 Intel Corporation | ||
# Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. | ||
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
|
||
include(${UMF_CMAKE_SOURCE_DIR}/cmake/helpers.cmake) | ||
|
||
set(UMF_BA_SOURCES_COMMON base_alloc_global.c base_alloc.c base_alloc_linear.c) | ||
set(UMF_BA_SOURCES_LINUX base_alloc_linux.c) | ||
set(UMF_BA_SOURCES_WINDOWS base_alloc_windows.c) | ||
|
||
if(LINUX OR MACOSX) | ||
set(UMF_BA_SOURCES ${UMF_BA_SOURCES_COMMON} ${UMF_BA_SOURCES_LINUX}) | ||
elseif(WINDOWS) | ||
set(UMF_BA_SOURCES ${UMF_BA_SOURCES_COMMON} ${UMF_BA_SOURCES_WINDOWS}) | ||
endif() | ||
|
||
add_umf_library( | ||
NAME umf_ba | ||
TYPE STATIC | ||
SRCS ${UMF_BA_SOURCES} | ||
LIBS umf_utils) | ||
|
||
target_include_directories(umf_ba | ||
PRIVATE ${UMF_CMAKE_SOURCE_DIR}/src/base_alloc) | ||
|
||
if(NOT UMF_BUILD_SHARED_LIBRARY) | ||
install(TARGETS umf_ba EXPORT ${PROJECT_NAME}-targets) | ||
endif() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,56 +1,46 @@ | ||
# Copyright (C) 2023-2024 Intel Corporation | ||
# Copyright (C) 2023-2025 Intel Corporation | ||
# Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. | ||
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
|
||
include(${UMF_CMAKE_SOURCE_DIR}/cmake/helpers.cmake) | ||
|
||
set(PROXY_SOURCES proxy_lib.c) | ||
set(UMF_PROXY_SOURCES_COMMON proxy_lib.c) | ||
set(UMF_PROXY_SOURCES_LINUX proxy_lib_linux.c) | ||
set(UMF_PROXY_SOURCES_WINDOWS proxy_lib_windows.c) | ||
|
||
set(PROXY_SOURCES_LINUX proxy_lib_linux.c) | ||
|
||
set(PROXY_SOURCES_WINDOWS proxy_lib_windows.c) | ||
|
||
set(PROXY_SOURCES_MACOSX proxy_lib_linux.c) | ||
|
||
if(LINUX) | ||
set(PROXY_SOURCES ${PROXY_SOURCES} ${PROXY_SOURCES_LINUX}) | ||
if(LINUX OR MACOSX) | ||
set(UMF_PROXY_SOURCES ${UMF_PROXY_SOURCES_COMMON} | ||
${UMF_PROXY_SOURCES_LINUX}) | ||
elseif(WINDOWS) | ||
set(PROXY_SOURCES ${PROXY_SOURCES} ${PROXY_SOURCES_WINDOWS}) | ||
|
||
set(UMF_PROXY_SOURCES ${UMF_PROXY_SOURCES_COMMON} | ||
${UMF_PROXY_SOURCES_WINDOWS}) | ||
# Add resource file needed for Windows to fill metadata in binary files | ||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/proxy_lib.rc.in" | ||
"${CMAKE_CURRENT_BINARY_DIR}/proxy_lib.rc" IMMEDIATE @ONLY) | ||
set(PROXY_SOURCES ${PROXY_SOURCES} ${CMAKE_CURRENT_BINARY_DIR}/proxy_lib.rc) | ||
elseif(MACOSX) | ||
set(PROXY_SOURCES ${PROXY_SOURCES} ${PROXY_SOURCES_MACOSX}) | ||
set(UMF_PROXY_SOURCES ${UMF_PROXY_SOURCES_COMMON} | ||
${CMAKE_CURRENT_BINARY_DIR}/proxy_lib.rc) | ||
endif() | ||
|
||
add_umf_library( | ||
NAME umf_proxy | ||
TYPE SHARED | ||
SRCS ${BA_SOURCES} ${PROXY_SOURCES} | ||
LIBS umf_utils ${PROXY_LIBS} | ||
SRCS ${UMF_PROXY_SOURCES} | ||
LIBS umf umf_utils umf_ba | ||
LINUX_MAP_FILE ${CMAKE_CURRENT_SOURCE_DIR}/proxy_lib.map | ||
WINDOWS_DEF_FILE ${CMAKE_CURRENT_SOURCE_DIR}/proxy_lib.def) | ||
set_target_properties(umf_proxy PROPERTIES SOVERSION ${PROJECT_VERSION_MAJOR}) | ||
|
||
add_library(${PROJECT_NAME}::proxy ALIAS umf_proxy) | ||
|
||
target_link_directories(umf_proxy PRIVATE ${LIBHWLOC_LIBRARY_DIRS}) | ||
|
||
target_compile_definitions(umf_proxy PRIVATE ${UMF_COMMON_COMPILE_DEFINITIONS}) | ||
set_target_properties(umf_proxy PROPERTIES SOVERSION ${PROJECT_VERSION_MAJOR}) | ||
|
||
if(PROXY_LIB_USES_SCALABLE_POOL) | ||
target_compile_definitions(umf_proxy PRIVATE PROXY_LIB_USES_SCALABLE_POOL=1) | ||
target_compile_definitions(umf_proxy | ||
PRIVATE "PROXY_LIB_USES_SCALABLE_POOL=1") | ||
elseif(PROXY_LIB_USES_JEMALLOC_POOL) | ||
target_compile_definitions(umf_proxy PRIVATE PROXY_LIB_USES_JEMALLOC_POOL=1) | ||
target_compile_definitions(umf_proxy | ||
PRIVATE "PROXY_LIB_USES_JEMALLOC_POOL=1") | ||
endif() | ||
|
||
target_include_directories( | ||
umf_proxy | ||
PUBLIC $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include> | ||
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/src/utils> | ||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}> | ||
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>) | ||
umf_proxy PRIVATE ${UMF_CMAKE_SOURCE_DIR}/src/base_alloc | ||
${UMF_CMAKE_SOURCE_DIR}/src/ravl) | ||
|
||
install(TARGETS umf_proxy EXPORT ${PROJECT_NAME}-targets) |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.