Skip to content

Next step in connecting libdispatch and foundation builds #256

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 1 commit into from
Feb 25, 2016
Merged
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
4 changes: 4 additions & 0 deletions CoreFoundation/Base.subproj/CFBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@
#define __HAS_DISPATCH__ 1
#endif
#endif
#if DEPLOYMENT_TARGET_LINUX && DEPLOYMENT_RUNTIME_SWIFT && DEPLOYMENT_ENABLE_LIBDISPATCH
#define __HAS_DISPATCH__ 1
#endif

// Some compilers provide the capability to test if certain features are available. This macro provides a compatibility path for other compilers.
#ifndef __has_feature
#define __has_feature(x) 0
Expand Down
8 changes: 8 additions & 0 deletions build.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,14 @@
'-L${XCTEST_BUILD_DIR}',
'-I/usr/include/libxml2'
]

if "LIBDISPATCH_SOURCE_DIR" in Configuration.current.variables:
foundation.CFLAGS += " "+" ".join([
'-DDEPLOYMENT_ENABLE_LIBDISPATCH',
'-I'+Configuration.current.variables["LIBDISPATCH_SOURCE_DIR"],
'-I'+Configuration.current.variables["LIBDISPATCH_BUILD_DIR"]+'/tests' # for include of dispatch/private.h in CF
])

foundation.SWIFTCFLAGS = " ".join(swift_cflags)

foundation.LDFLAGS += '-lpthread -ldl -lm -lswiftCore -lxml2 '
Expand Down