swiftlang / swift

The Swift Programming Language
https://swift.org
Apache License 2.0
67.55k stars 10.35k forks source link

[SR-2653] Allow CMake SWIFT_BUILD_SOURCEKIT to be enabled/disabled via build-script #45258

Open ec882e32-f2b6-4d2a-849c-98d6c7df0cfb opened 8 years ago

ec882e32-f2b6-4d2a-849c-98d6c7df0cfb commented 8 years ago
Previous ID SR-2653
Radar None
Original Reporter @modocache
Type Improvement
Additional Detail from JIRA | | | |------------------|-----------------| |Votes | 0 | |Component/s | Project Infrastructure | |Labels | Improvement, StarterBug | |Assignee | None | |Priority | Medium | md5: 9e97a17cc680616ce092d753d43de0a3

Issue Description:

I'm currently attempting to cross-compile the stdlib for Android using a macOS host. One snag is that apple/swift/CMakeLists.txt adds a SourceKit target if the host machine is Darwin, and does not add it if the host is Linux. I should be able to turn SourceKit builds on or off via the build-script.

Following the project's convention, this should probably be an option named --skip-build-sourcekit. On Linux, utils/build-script should pass this option by default. On Darwin, it should not.

ec882e32-f2b6-4d2a-849c-98d6c7df0cfb commented 8 years ago

Scratching my own itch here: https://github.com/apple/swift/pull/4806

ec882e32-f2b6-4d2a-849c-98d6c7df0cfb commented 8 years ago

Apparently my approach isn't ideal here. Others should feel free to try to do it right, I might not be able to update my pull request for another few days.