Commit Graph

46 Commits

Author SHA1 Message Date
swift-ci
5e13094e8f Merge pull request #12400 from compnerd/dispatch-make-program 2017-10-12 13:13:26 -07:00
Saleem Abdulrasool
429a368ef3 build: pass along CMAKE_BUILD_PROGRAM to sub-build
Pass along our `CMAKE_BUILD_PROGRAM` to the libdispatch build which is
done as part of the build for SourceKit.
2017-10-12 08:28:32 -07:00
Saleem Abdulrasool
e6a0655a9c build: add a dependency on SwiftShims for libdispatch
During a parallel build, this was noticed:
  <unknown>:0: error: missing required module 'SwiftShims'

Ensure that we have a dependency on the SwiftShims target for
libdispatch.
2017-10-10 15:05:25 -07:00
Saleem Abdulrasool
a192e67ae9 build: force rebuild of libdispatch always
This pays a small penalty in build times by invoking an extra call to
ninja.  However, unless there is a change in libdispatch, no actions
will be taken other than ensuring that it is up-to-date.  Should ensure
that the buildbots switching between builds DTRT.
2017-10-07 11:06:59 -07:00
Saleem Abdulrasool
e69c44352b Update CMakeLists.txt 2017-10-03 22:01:19 -07:00
Saleem Abdulrasool
9fff09d817 build: improve SourceKit handling of libdispatch
Avoid overwriting the `swiftCore` target in the SourceKit build.
Instead, link to the explicit variant of the swiftCore.  This tracks the
dependency better and enables multiple parallel cross-compilations of
the stdlib.

Implicitly link against swiftCore when linking against libdispatch.
Remove the extraneous link against the Blocks runtime on Linux.  The
`add_sourcekit_executable` call already handles this.  Ensure that we
enable the swift SDK overlay for libdispatch by sending it the path to
the swift compiler.
2017-10-02 21:40:29 -07:00
Michael Gottesman
a05c4dda07 [cmake] Move the 'routines' of SourceKit's cmake into a cmake module.
This is a NFC change that makes it easier to read SourceKit's main
CMakeLists.txt file since you only see "actions" rather than also this huge list
of helper routines.
2017-09-20 20:33:16 -07:00
Saleem Abdulrasool
8d3c30e2fa build: switch libdispatch build to cmake
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.
2017-09-17 17:01:28 -07:00
Harlan
4ff07077bc Rename DEPENDS to LINK_LIBS throughout SourceKit (#11228)
Currently, SourceKit's CMake functions all use DEPENDS to specify
libraries the targets will link with. This is confusing as it doesn't
behave the same way that add_swift behaves, and implies that
dependencies are created when there aren't.
2017-08-01 21:25:19 -07:00
Harlan
4b83c16c07 Make SourceKitSwiftLang depend on swift-syntax-generated-headers (#11226) 2017-07-27 13:24:55 -07:00
Chris Bieneman
3003bf6f9e Don't override CMAKE_* variables if CMAKE_CROSSCOMPILING is set
This patch allows Swift to build correctly when using CMake's cross compiling facilities instead of hacking around them.
2017-07-25 13:49:02 -07:00
Norio Nomura
a93bddf019 Set rpath to libsourcekitdInProc.so on Linux 2017-04-29 06:28:35 +09:00
Alex Blewitt
1673b5e8fd Build SourceKit on Linux if dispatch is present
SourceKit can be built on Linux if dispatch is available
so enable this so it happens by default.

Issue: SR-1676
2017-02-10 22:03:13 +00:00
Chris Bieneman
44b6f32f0e Clean up handling of CMark library dependency.
This change depends on:

https://github.com/apple/swift-cmark/pull/4
2017-02-08 14:32:50 -08:00
Alex Blewitt
3e9f66c6ca Enable sourcekitd to be built by default on Linux
The Linux build has a dependency on the libdispatch library,
which is needed by the various native libraries for sourcekitd.

On macOS, the dependency for libdispatch is satisfied directly through
the base OS, but on Linux no such dependency exists.

Modify this so that if the SourceKit library is built, and the
libdispatch library is already present, then we shell out to make
the libdispatch binary project when the SourceKit is built.

Issue: SR-1676
2017-01-17 19:21:52 +00:00
Alex Blewitt
25fc295e4a Revert "Merge pull request #6807 from alblue/SR-1676"
This reverts commit c85cbe5c78, reversing
changes made to 5d293ab9d2.
2017-01-17 09:47:07 +00:00
Alex Blewitt
f7836ae0c8 Enable sourcekitd to be built by default on Linux
The Linux build has a dependency on the libdispatch library,
which is needed by the various native libraries for sourcekitd.

On macOS, the dependency for libdispatch is satisfied directly through
the base OS, but on Linux no such dependency exists.

Modify this so that if the SourceKit library is built, and the
libdispatch library is already present, then we shell out to make
the libdispatch binary project when the SourceKit is built.

Issue: SR-1676
2017-01-14 10:38:45 +00:00
Arnold Schwaighofer
ca12aaacd4 Revert "Enable SourceKit building by default on Linux" 2017-01-10 15:36:29 -08:00
Alex Blewitt
7159f6af1d Enable sourcekitd to be built by default on Linux
The Linux build has a dependency on the libdispatch library,
which is needed by the various native libraries for sourcekitd.

On macOS, the dependency for libdispatch is satisfied directly through
the base OS, but on Linux no such dependency exists.

Modify this so that if the SourceKit library is built, and the
libdispatch library is already present, then we shell out to make
the libdispatch binary project when the SourceKit is built.

Issue: SR-1676
2016-12-01 10:54:36 +00:00
practicalswift
cc852042c9 [gardening] Fix accidental trailing whitespace. 2016-10-29 10:22:58 +02:00
Doug Coleman
e03265877c [cmake] Make sure SOURCEKIT_DEPLOYMENT_OS is only set once, at the top.
Reset Darwin specific CMake variables to match the correct
SDK and architecture. This is needed when cross compiling, or we'll end up with
conflicting SDK and architectures.

Remove unused variable SOURCEKIT_GLOBAL_DEPLOYMENT_TARGET_FLAGS.
2016-10-18 13:40:04 -07:00
Michael Gottesman
e338c45964 [lto][cmake] When building with lto on macOS, specify to the linker the path where it should put the generated LTO object file.
This is important so that the object file references in the debug info are
preserved for possible use by dsymutil.

rdar://28062659
2016-09-24 22:38:33 -07:00
Michael Gottesman
b3819c6783 [cmake] Rename COMPONENT_DEPENDS to LLVM_COMPONENT_DEPENDS (#4311)
Now that I am going to be adding an IN_SWIFT_COMPONENT argument, I need to do
this to distinguish the concepts of an LLVM_COMPONENT and a SWIFT_COMPONENT.
2016-08-16 12:13:34 -04:00
JP Simard
d3d211b154 link libswiftCore when building SourceKit on Linux
since libdispatch now includes a Swift overlay
2016-07-19 10:11:11 -07:00
Brian Croom
e109cb8285 [SourceKit] Add libdispatch as a dependency for some SourceKit products
sourcekitdInProc, sourcekitd-test, and complete-test need to be explicitly
linked with libdispatch on Linux to build properly.
2016-07-18 16:17:49 -07:00
Harlan
1625d97976 Switch to llvm-profdata's pooled profdata merge (#3281) 2016-07-01 16:45:21 -07:00
Michael Gottesman
61df461e88 [lto][cmake] Add LTO support to SourceKit.
rdar://24717107
2016-06-10 13:33:49 -07:00
therealbnut
2f4aed7bb2 Fix some CMakeLists syntax 2016-06-04 06:44:10 +10:00
Brian Gesiak
d7e2e1f93e [SR-1613][SourceKit] Require blocks runtime
SourceKit makes heavy use of blocks. In order to port SourceKit to Linux,
we either need to rewrite much of it to use function pointers, or we must
require a blocks runtime. This commit requires a blocks runtime, but only
when SourceKit is being built. Currently, SourceKit is not built on Linux,
so this should not affect anyone.
2016-05-25 17:17:32 -04:00
Argyrios Kyrtzidis
f242326627 [SourceKit] Use DARWIN_TOOLCHAIN_VERSION if provided, as the version to use for the XPC service name.
This is to make service name in the external toolchains unique.
rdar://25612603
2016-04-07 21:34:26 -07:00
practicalswift
abfecfde17 [gardening] if ([space]…[space]) → if (…), for(…) → for (…), while(…) → while (…), [[space]x, y[space]] → [x, y] 2016-04-04 16:22:11 +02:00
mawadah
9494681745 [cmake] Allow Swift libraries to individually build for specific
deployment targets.
2016-02-25 16:54:43 -08:00
Argyrios Kyrtzidis
9e244a5275 [SourceKit] Bring back the 'com.apple.' prefix for the bundle identifier of the XPC service.
We need this currently. Later-on we can make this more configurable.
2016-02-04 16:42:15 -08:00
Harlan Haskins
1777c20aff [coverage] Fixed indentation in CMake 2016-02-01 12:38:22 -08:00
Harlan Haskins
44be500157 [coverage] Changed back to old coverage check in CMakeLists.txt files 2016-01-28 13:21:38 -08:00
Harlan Haskins
e997fc3ae3 [coverage] Changed 'none' to 'false' for coverage default 2016-01-28 11:23:59 -08:00
Harlan Haskins
9eb729ce79 [coverage] Reworked CMake invocation for coverage testing given there are three states for SWIFT_ANALYZE_CODE_COVERAGE 2016-01-26 16:36:26 -08:00
Harlan Haskins
c6c0b3d5d0 [coverage] Removed explicit swift-%p.profraw arguments from CMake commands, because we're using LLVM's environment variables 2016-01-25 19:49:03 -08:00
Argyrios Kyrtzidis
c24099c585 [sourcekit] Add the version to the XPC service identifier so that it can be distinct amongst multiple toolchains.
rdar://24292112
2016-01-21 18:42:05 -08:00
Luke Larson
ba619a9ff2 [CMake] Support code coverage analysis 2016-01-19 18:51:07 -08:00
Dmitri Gribenko
42591f7cba SourceKit CMake: use the C compiler and linker flags computed by the Swift build system 2016-01-11 16:23:54 -08:00
Dmitri Gribenko
08854d13ac SourceKit CMake: remove code to handle legacy SDKs 2016-01-11 16:23:54 -08:00
Jordan Rose
6a0527ec14 [SourceKit/CMake] Fix output directory for building with Xcode. 2015-11-06 16:27:08 -08:00
Ben Langmuir
07e7be5d99 [sourcekit] Fix swift library dependencies
Now that we're in the same repo, use cmake targets instead of paths so
we get correct dependencies.
2015-11-05 12:47:38 -08:00
Argyrios Kyrtzidis
8f0bc8c95f [CMake] Fix building SourceKit for a standalone build. 2015-11-05 11:02:47 -08:00
Argyrios Kyrtzidis
8ff6a98a99 [sourcekit] Merge SourceKit into the Swift repo.
The code goes into its own sub-tree under 'tools' but tests go under 'test',
so that running 'check-swift' will also run all the SourceKit tests.

SourceKit is disabled on non-darwin platforms.
2015-11-05 01:09:08 -08:00