14 Commits

Author SHA1 Message Date
Saleem Abdulrasool
b6412e3e38 Ninja: add placeholders to support Swift build
Add the placeholders needed to support compiling Swift code.
2019-05-16 14:41:05 -04:00
Saleem Abdulrasool
d688c4c19d Swift: remove unnecessary unreleased Ninja infrastructure
This cleans up the new options that were added to support Swift.  This
was not released, and the proper support approach that we settled upon
does not require as much specialised support.
2019-05-16 14:41:05 -04:00
Saleem Abdulrasool
001446126e Ninja: add final placeholders to merge Swift partials
This adds the placeholders that are needed to merge the swift partial
modules.  It permits generating the rules necessary to actually merge
the partial modules emitted for a partial compilation.
2019-02-20 09:25:34 -08:00
Saleem Abdulrasool
c048cb75fc Ninja: add properties for Swift partial module and doc
When building a swift object, we emit a partial swiftmodule and swiftdoc
that must be merged at the end.  However, in order to do that, we need
to enumerate the swiftmodules and swiftdocs.  As a result, the path must
be known to CMake.  Rather than hardcoding the rules into CMake, create
a source property that we can query.  This will allow us to create a
final placeholder to emit the merge rule.

Issue: #18800
2019-02-18 11:15:47 -08:00
Saleem Abdulrasool
157570b5a2 Add placeholder for Swift's library name
This allows us to set the proper link name for the Swift library
(soname).  Because this needs to be passed to the object being compiled,
we need to create a new placeholder so that it can be sent along to the
frontend.  Default to the target name unless it is explicitly provided.
2019-02-13 09:25:29 -08:00
Regina Pfeifer
5a0784ddea clang-tidy: Pass by value 2019-01-22 13:03:04 -05:00
Saleem Abdulrasool
0ffe8f8844 Ninja: support SWIFT_MODULE_NAME property
Add a new `SWIFT_MODULE_NAME` property that defaults to the target name.
This is needed as otherwise, the first source file determines the module
name.

Issue: #18800
2019-01-18 07:52:17 -05:00
Saleem Abdulrasool
b90e6134a7 Ninja: add new placeholder SWIFT_AUXILIARY_SOURCES
The swift compilation model requires all sources for the module to be
listed for the compiler to type check across them.  Provide a
placeholder to allow enumerating the remainder of the swift sources in a
target for the language compile rule.

Issue: #18800
2019-01-15 09:13:33 -08:00
Cengizhan Pasaoglu
c67ab22cdc Using front() and back() instead of calculations 2018-11-06 21:43:33 +03:00
Pavel Solodovnikov
8b6f439ef2 Access string npos without instance 2017-06-01 14:19:51 -04:00
Brad King
53e89b6ab0 Add options for separate compile and link sysroots
Add `CMAKE_SYSROOT_COMPILE` and `CMAKE_SYSROOT_LINK` variables to as
operation-specific alternatives to `CMAKE_SYSROOT`.  This will be useful
for Android NDKs that compile and link with different sysroot values
(e.g. `r14` with unified headers).

Co-Author: Florent Castelli <florent.castelli@gmail.com>
2017-05-09 14:21:54 -04:00
Daniel Pfeifer
2e620f0b38 Fix several include-what-you-use findings 2016-11-08 09:42:04 -05:00
Zack Galbreath
cfbf857b22 cmRulePlaceholderExpander: Fix CMAKE_<LANG>_COMPILER_ARG1 replacement
Refactoring in commit b29425f7 (cmLocalGenerator: Populate a container
of mappings for replacements, 2016-10-09) broke substitution of this
placeholder by storing the wrong key in the new replacement map.
Use the proper key, `CMAKE_<LANG>_COMPILER_ARG1`.
2016-11-01 10:00:24 -04:00
Stephen Kelly
bdddd4234e cmRulePlaceholderExpander: Extract from cmLocalGenerator
Implement cmLocalGenerator::ExpandRuleVariables in terms of the new
class for source compatibility and to reduce diff noise in this commit.
2016-10-15 11:25:12 +02:00