Commit Graph

20 Commits

Author SHA1 Message Date
Saleem Abdulrasool
218b37e1bb build: rename LLVM_COMPONENT_DEPENDS
This is not a target dependency but a target link.  Name the parameter
to be less misleading.  This also makes the name identical to the LLVM
parameter.
2019-05-04 19:58:28 -07:00
Alex Langford
3d9a28925b [CMake] Modify swift_install_in_component to support cmake install components
CMake supports the notion of installation components. Right now we have some
custom code for supporting swift components. I think that for installation
purposes, it would be nice to use the CMake component system.

This should be a non-functional change. We should still only be generating
install rules for targets and files in components we want to install, and we
still use the install ninja target to install everything.
2019-04-19 14:06:11 -07:00
Alex Langford
799eb632c8 [CMake] Make SourceKit respect link_libraries and library_search_directories
add_sourcekit_default_compiler_flags was invoking
_add_variant_link_flags and getting link flags but not actually using
the link_libraries or library_search_directories. In android builds,
this means that the correct libc++ is not being linked against.
2019-04-02 12:06:44 -07:00
Ben Langmuir
1efade0b47 [cmake] Move install() after set_target_properties() to workaround crash
Calling install() on a framework target before setting the FRAMEWORK
property triggers a [crash](https://gitlab.kitware.com/cmake/cmake/issues/18848). Workaround by changing the call order.
2019-01-28 16:24:09 -08:00
Saleem Abdulrasool
522f97da43 build: simplify the blocks handling
`-fblocks` is a core driver option now, so it can be used with both the GCC
style driver as well as the cl style driver.  Simplify the logic for the
handling of this option.
2018-12-07 08:24:19 -08:00
Argyrios Kyrtzidis
92377cc145 [CMake] Move cross-platform dispatch/blocks support to the tools level, in preparation for the syntax parser library 2018-12-05 22:41:39 -08:00
Jordan Rose
6afe77ae98 [CMake] Clean up (somewhat) the generated Xcode project (#20586)
Still to do: have command-only targets that present sources, for things
like copy_shim_headers.
2018-11-26 11:31:41 -08:00
Michael Gottesman
3f17bb6ddf Carefully split the build's invocation of add_swift_library into host/target variants.
The key thing here is that all of the underlying code is exactly the same. I
purposely did not debride anything. This is to ensure that I am not touching too
much and increasing the probability of weird errors from occurring. Thus the
exact same code should be executed... just the routing changed.
2018-10-27 12:58:51 -07:00
Saleem Abdulrasool
2f8a4dbf4a Merge pull request #19933 from compnerd/micro-opt
SourceKit: micro-optimization of CMake (NFC)
2018-10-19 14:58:20 -07:00
Saleem Abdulrasool
13c83b121e SourceKit: always install headers
Ensure that we install the client header for the InProc sourcekitd. This is
needed to actually make it usable. With this, it is now possible to develop
against SourceKit on Linux and Windows.
2018-10-17 15:01:27 -07:00
Saleem Abdulrasool
8395e355e5 SourceKit: micro-optimization of CMake (NFC)
Set all the target properties in a single shot.  This avoids the multiple string
parsing within CMake.  Although this makes no noticable differnce, it is
slightly more efficient and also colocates all the target properties.
2018-10-17 14:53:24 -07:00
Saleem Abdulrasool
0df7b2f4be SourceKit: enable builds for Windows
SourceKit's build is now ammenable to building for Windows.  Generalize the path
to enable building it for Windows as well as Linux.  The libdispatch build for
the compiler is needed for all non-Darwin targets currently.
2018-10-04 16:44:54 -07:00
Saleem Abdulrasool
3469797df5 SourceKit: use shared BlocksRuntime
Adjust the SourceKit's embedded libdispatch build to use the shared build of
BlocksRuntime now that we can generate that.
2018-10-03 09:27:49 -07:00
Saleem Abdulrasool
6c8c7151ff SourceKit: repair the build when cross-compiling
Not all targets (CMAKE_SYSTEM_NAME) use `lib` and `.a` for the static library
name.  Adjust the name properly for the host that we are building for.  This
repairs the build when performing a cross-compile from Linux to Windows.
2018-10-01 14:54:06 -07:00
Argyrios Kyrtzidis
4179ceb4f9 Add a comment for the AddSwiftSourceKit.cmake change 2018-06-26 10:57:01 -07:00
Argyrios Kyrtzidis
7f6afa0357 [SourceKit/CMake] Make sure the XPC service executable isn't linked with an absolute build directory rpath
rdar://40462455
2018-06-26 10:47:11 -07:00
Argyrios Kyrtzidis
3156180c08 [SourceKit] For the XPC service identifier, also include the platform name
This is useful because the embedded platforms may have the same toolchain version but they contain
different stdlibs. We need to make sure the XPC service name is unique between them, otherwise we may load
and use the incorrect toolchain service.

rdar://39077520
2018-04-10 11:24:55 -07:00
Bob Wilson
390058972a [master-next] Use PRIVATE in target_link_libraries for executables
This is needed to work with LLVM r319840.
2017-12-06 21:55:22 -08: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