Commit Graph

1144 Commits

Author SHA1 Message Date
Dario Rexin
20b2fec8a9 Merge pull request #30978 from compnerd/variants
build: duplicate and rename the `_add_variant_*` functions
2020-04-13 13:55:47 -07:00
Robert Widmann
22b0526917 Merge pull request #30082 from 3405691582/OpenBSD_Port_Build
Build system recognizes OpenBSD.
2020-04-12 09:30:17 -07:00
Saleem Abdulrasool
3d1bfdedb6 Merge pull request #30977 from compnerd/unused
build: prune some unused options for `_add_swift_host_executable_single`
2020-04-11 16:05:17 -07:00
Saleem Abdulrasool
87cbb3132d build: duplicate and rename the _add_variant_* functions
This allows us to start splitting up the swift and C/C++ specific paths.
2020-04-11 13:24:31 -07:00
Saleem Abdulrasool
319a9e0cf0 build: prune some unused options for _add_swift_host_executable_single
Remove some unused parameters for this function.  This simplification
will make it easier to merge `_add_swift_host_executable_single` into
`add_swift_host_executable`.
2020-04-11 12:26:30 -07:00
Saleem Abdulrasool
7e2ca19ba8 build: remove Swift search paths for host
Remove the Swift library search path for the host paths which are C/C++
only.
2020-04-11 12:25:34 -07:00
Doug Gregor
5bbc43c4d2 [CMake] Add -simulator to simulator target triples.
The build systems that drive Swift compilation have been using the
"simulator" environment as part of the increasingly inaccurately
named "target triple" to specify simulator targets for several
years... except our own hand-rolled build system. Identify
simulator targets and append "-simulator" to their target
triples.
2020-04-06 16:52:56 -07:00
3405691582
f8d0174b85 Build system recognizes OpenBSD.
Commit for CMake and build scripts to recognize OpenBSD. To keep this
commit relatively short, this just deals with the rather simple and
uncontroversial changes to the build system.

Note that OpenBSD calls "x86_64" as "amd64", Since the Swift stdlib will
be put in a subdirectory named after ARCH, to ensure the standard
library is properly found later, we use the native architecture name for
OpenBSD in the build system rather than trying to deal with the
difference the other way around.
2020-04-03 13:34:17 -04:00
Eric Miotto
b3e86610fa [build] set linker parameters in a single way (#30339)
After noticing that also in CMake 3.16 the LINKER: prefix is not
expanded correctly when used in `target_link_options`, prefer to set the
linker parameters in a more verbose way and leave a comment behind on
when this behavior was observed in case we want to change the
implementation later.

Follow up to #29636.
Addresses rdar://problem/59732421
2020-03-11 07:41:50 -07:00
Dario Rexin
6dc4329398 Move SwiftSource.cmake to stdlib 2020-03-08 12:48:34 -07:00
Kuba (Brecka) Mracek
ab6533a40f Merge branch 'master' into mracek/arm64e 2020-03-06 15:07:01 -08:00
Doug Gregor
144ec416e6 [CMake] Stop requiring ${SDK}/System/Library/Frameworks/module.modulemap
Remove anachronistic check for a "blanket" module map in
/System/Library/Frameworks from Darwin SDK configuration. We already
extract other information from the SDK that we actually need, so check
for that directly instead.

Fixes rdar://problem/60084609.
2020-03-06 09:34:45 -08:00
Saleem Abdulrasool
b40bd3ecba build: remove reference to handle_swift_sources in C++ path
The toolchain binaries are all C++ code.  This removes the last tie to
the custom Swift handling in CMake for the host functions.
2020-02-27 21:32:45 -08:00
Kuba Mracek
45ba5cec05 [arm64e] Add arm64e support into Swift's build system 2020-02-27 16:08:15 -08:00
Saleem Abdulrasool
fc67fc74fb build: shuffle around some functions
This is a purely code motion change.  It moves the functions that are
specific to `SwiftSource.cmake` into `SwiftSource.cmake`.  Target
functions are moved to `stdlib/cmake/modules/AddSwiftStdlib.cmake`.
2020-02-26 12:47:43 -08:00
Saleem Abdulrasool
2e2e886832 build: bifurcate _add_swift_executable_single 2020-02-23 14:20:12 -08:00
Michael Gottesman
79716efbee Merge pull request #29960 from compnerd/add-swift-host-library-single-simplifications
`_add_swift_host_library_single` simplifications
2020-02-20 23:26:52 -08:00
Michael Ilseman
bfd0de4928 Revert "Revert "Revert "swift-lang: shuffle the source directory structure (N…" 2020-02-20 15:39:51 -08:00
Saleem Abdulrasool
4b2cbd64f4 build: rename prefix for _add_swift_host_library_single 2020-02-20 09:10:00 -08:00
Saleem Abdulrasool
a32b479250 build: custom import libraries are not needed for host libraries 2020-02-20 09:10:00 -08:00
Saleem Abdulrasool
4a93f70e1f build: use a regular expression in _add_swift_host_library_single 2020-02-20 09:10:00 -08:00
Saleem Abdulrasool
749dd266c3 build: inline constant values for _add_swift_host_library_single 2020-02-20 09:10:00 -08:00
Saleem Abdulrasool
f11ecdec9c build: remove unnecessary set_target_property
Now that `_add_swift_host_library_single` only deals with host
libraries, it is no longer mutating the name of the library target.
This `set_target_property` is no longer needed.
2020-02-20 09:10:00 -08:00
Saleem Abdulrasool
56e58b4764 build: remove duplicated parameter to _add_swift_host_library_single 2020-02-20 09:09:59 -08:00
Saleem Abdulrasool
200b96df81 Revert "Revert "swift-lang: shuffle the source directory structure (NFC)""
This reverts commit beb8ecd8cc.  Add a
workaround for the dependency issue.

It is unclear why `sourcekitd` is getting added improperly as a
dependency on `lib/sourcekitd.framework/sourcekitd`.  This workaround
adjusts the dependency such that we end up with a dependency on
`lib/sourcekitd.framework/Versions/A/sourcekitd` as an order-only
dependency.  This should fix the compile issue.  I am unable to
reproduce this issue with the `add_library` usage for adding a Swift
library.  This allows us to cleave the host and target libraries, and so
the workaround is sufficient to make progress and the problem will be
resolved with the migration towards CMake for handling the dependencies.
2020-02-19 16:09:37 -08:00
Saleem Abdulrasool
697a44cf81 build: inline some variables in _add_swift_host_library_single 2020-02-16 13:53:38 -08:00
Saleem Abdulrasool
8430a0388f build: remove swiftCore workaround in _add_swift_host_library 2020-02-16 13:53:38 -08:00
Saleem Abdulrasool
d01312cc3e build: remove ICU references in _add_swift_host_library_single 2020-02-16 13:53:38 -08:00
Saleem Abdulrasool
dbd4ea05d7 build: remove unreferenced variable in _add_swift_host_library_single 2020-02-16 13:53:38 -08:00
Saleem Abdulrasool
cefb90d485 build: remove some un-valuved variables in _add_swift_host_library_single 2020-02-16 13:53:38 -08:00
Saleem Abdulrasool
bd60845eda build: simplify INSTALL_NAME_DIR computation in _add_swift_host_library_single 2020-02-16 13:53:38 -08:00
Saleem Abdulrasool
a8d9ab1537 build: cleanup unreferenced variable SWIFTLIB_SINGLE_EXTERNAL_SOURCES in _add_swift_host_library_single 2020-02-16 13:53:38 -08:00
Saleem Abdulrasool
4f516dad9a build: remove Swift support for _add_swift_host_library_single
The host libraries do not build Swift code, these libraries are C++
libraries used for the compiler.
2020-02-16 13:53:38 -08:00
Saleem Abdulrasool
3c9bb5a1df build: remove DARWIN_INSTALL_NAME_DIR from _add_swift_host_library_single 2020-02-16 13:53:38 -08:00
Saleem Abdulrasool
7235462e0a build: remove DEPLOYMENT_VERSION_* from _add_swift_host_library_single 2020-02-16 13:53:38 -08:00
Saleem Abdulrasool
546b9b6f8c build: remove SWIFT_COMPILE_FLAGS from _add_swift_host_library_single 2020-02-16 13:53:38 -08:00
Saleem Abdulrasool
626a1f418a build: remove FILE_DEPENDS from _add_swift_host_library_single 2020-02-16 13:53:37 -08:00
Saleem Abdulrasool
7f4b40678c build: remove INCORPORATE_OBJECT_LIBRARIES_SHARED_ONLY from _add_swift_host_library_single 2020-02-16 13:53:37 -08:00
Saleem Abdulrasool
b70b2b1dd0 build: remove INCORPORATE_OBJECT_LIBRARIES from _add_swift_host_library_single 2020-02-16 13:53:37 -08:00
Saleem Abdulrasool
36193c363b build: remove LINK_FLAGS from _add_swift_host_library_single 2020-02-16 13:53:37 -08:00
Saleem Abdulrasool
d1d70092ce build: remove FRAMEWORK_WEAK_DEPENDS from _add_swift_host_library_single 2020-02-16 13:53:37 -08:00
Saleem Abdulrasool
e4064fd0c4 build: remove FRAMEWORK_DEPENDS from _add_swift_host_library_single 2020-02-16 13:53:37 -08:00
Saleem Abdulrasool
7bc703e43a build: remove DEPENDS from _add_swift_host_library_single 2020-02-16 13:53:37 -08:00
Saleem Abdulrasool
fd74b30359 build: remove PRIVATE_LINK_LIBRARIES from _add_swift_host_library_single 2020-02-16 13:53:37 -08:00
Saleem Abdulrasool
5d1c760486 build: remove LINK_LIBRARIES from _add_swift_host_library_single 2020-02-16 13:53:37 -08:00
Saleem Abdulrasool
abb9d7db90 build: remove C_COMPILE_FLAGS from _add_swift_host_library_single 2020-02-16 13:53:37 -08:00
Saleem Abdulrasool
d3298646db build: remove MODULE_TARGETS from _add_swift_host_library_single 2020-02-16 13:53:37 -08:00
Saleem Abdulrasool
9f637d4e1e build: remove MODULE path from _add_swift_host_library_single 2020-02-16 13:53:37 -08:00
Saleem Abdulrasool
f3d9f87417 build: remove OBJECT_LIBRARY from _add_swift_host_library_single 2020-02-16 13:53:37 -08:00
Saleem Abdulrasool
39d6e98b9b build: remove DONT_EMBED_BITCODE from _add_swift_host_library_single 2020-02-16 13:53:37 -08:00