Skip to content

build: various adjustments for the runtime libraries #874

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,9 @@ add_subdirectory(dispatch)
add_subdirectory(man)
add_subdirectory(os)
add_subdirectory(private)
if(NOT APPLE)
add_subdirectory(src/BlocksRuntime)
endif()
add_subdirectory(src)
if(BUILD_TESTING)
add_subdirectory(tests)
Expand Down
3 changes: 3 additions & 0 deletions src/BlocksRuntime/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ if(WIN32)
if(NOT BUILD_SHARED_LIBS)
target_compile_definitions(BlocksRuntime PRIVATE
BlocksRuntime_STATIC)
target_compile_options(BlocksRuntime PUBLIC
"$<$<COMPILE_LANGUAGE:C,CXX>:SHELL:$<$<BOOL:${MSVC}>:-Xclang >-static-libclosure>"
$<$<COMPILE_LANGUAGE:Swift>:SHELL:-Xcc -static-libclosure>)
endif()
endif()

Expand Down
6 changes: 1 addition & 5 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@

if(NOT APPLE)
add_subdirectory(BlocksRuntime)
endif()

add_library(dispatch
add_library(dispatch SHARED
allocator.c
apply.c
benchmark.c
Expand Down