I'm trying to build Swift 3 for Fedora 24. Fedora doesn't come with libkqueue so I built and installed that manually into /usr/(include|lib). Building libdispatch as part of the build script fails when trying to build the tests in swift-corelibs-libdispatch/tests because it can't find kqueue and kevent. If I modify the Makefile to include -lkqueue after -lpthread, it builds fine, but running the build script again (swift/util/build-script) complains about the directory not being clean.
What I'd like to do (I think) is modify ... something ... to make sure the Makefile in the tests directory includes kqueue; I've been diving into the build-settings.ini, as well as the various scripts, but CMake and Ninja are new to me and I'm a little flummoxed about what to modify (and hopefully bubble those changes up to a buildbot_linux_fedora or something like that). I've been poking around the various scripts (the most promising was the LIBDISPATCH_BUILD_ARGS in build-script-impl, but adding -lkqueue doesn't seem to have any effect).
So if somebody could give me a pointer (so to speak) about where to look, I'd greatly appreciate it.