-
Notifications
You must be signed in to change notification settings - Fork 10.5k
build: switch libdispatch build to cmake #10670
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
Conversation
@swift-ci please test |
Build failed |
swift-corelibs-libdispatch PR#264 should fix the build issue that happened here |
Please test with following PR: @swift-ci Please test |
Build failed |
CC @dgrove-oss |
I think we aren't ready to merge this PR yet. At least for me, I am seeing the libdispatch tests not linking correctly when built with CMake because of missing -L/-rpath to find libSwift. I will put in a dispatch PR for that today. @compnerd have you build the entire source tree (including swift, swift-corelibs-dispatch, swiftpm, swift-corelibs-foundation) from scratch with CMake driving the libdispatch build with this PR in place for build-script? |
No, I've not built the entire source tree. I've been focused on the swift compiler/runtime and libdispatch for now. I know of at least one other place where we need to tweak things. But, having an occasional run here is helpful to ensure that I don't accidentally regress the Darwin build. I've been trying to keep the Darwin build untouched. Does it not use the autoconf build? If so, I can greatly simplify this PR. I know that @das has been working on trying to fix up the CMake build for libdispatch to be sufficient for the macOS build, and I'm really looking forward to that to have a single unified build for libdispatch. |
7af6503
to
8501587
Compare
@swift-ci please test Lets see where we stand |
(Just doing a drive by test since the CI didn't seem to kick in). |
@swift-ci please test |
1 similar comment
@swift-ci please test |
Build failed |
Interesting, seems that the linker invocation is missing the |
I think the missing -rpath-link is because on the dispatch side it is looking for SWIFT_RUNTIME_LIBDIR to be defined. |
utils/build-script-impl
Outdated
-DCMAKE_CXX_COMPILER:PATH="${LLVM_BIN}/clang++" | ||
-DCMAKE_SWIFT_COMPILER:PATH="${SWIFTC_BIN}" | ||
-DCMAKE_INSTALL_PREFIX:PATH="$(get_host_install_destdir ${host})$(get_host_install_prefix ${host})" | ||
-DCMAKE_RUNTIME_LIBDIR:PATH="${DISPATCH_TMPLIBDIR}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-DSWIFT_RUNTIME_LIBDIR:PATH="${DISPATCH_TMPLIBDIR}"
Rebased and adjusted as per @dgrove-oss's point. |
@swift-ci please test |
Build failed |
4ff8bb8
to
dca06d5
Compare
Switched the sourcekit's build to use cmake as well. Adjusted the build-script to fix the rpath for swiftcore |
@swift-ci please test Linux platform |
Build failed |
dca06d5
to
0e617c1
Compare
@swift-ci please test |
Build failed |
Okay, so, the last failure was an install failure. I think that was caused by me using |
0e617c1
to
e21d87b
Compare
@swift-ci please test |
Build failed |
Build failed |
Okay, swift-corelibs-libdispatch PR303 should fix the symlink issue. It seems that I had them locally which is why I never saw this. I adjusted the dependencies to deal with BlocksRuntime dependencies being needed as well. |
Please test with following pull request: @swift-ci Please test Linux platform |
Use the cmake based build system for building libdispatch now that it is able to build Linux, android, and even possible to cross-compile to Windows.
e21d87b
to
8d3c30e
Compare
Please test with following pull request: @swift-ci Please test Linux platform |
Build failed |
@swift-ci please smoke test macOS platform |
Please test with following pull request: @swift-ci Please test macOS platform |
Build failed |
Just need to wait for the dispatch PR to get merged before this can be merged. |
@compnerd I am soooo excited about this! Getting rid of autoconf from the build? +1! +1! |
Woot! |
Use the cmake based build system for building libdispatch now that it is
able to build Linux, android, and even possible to cross-compile to
Windows.
Replace this paragraph with a description of your changes and rationale. Provide links to external references/discussions if appropriate.
Resolves SR-NNNN.