Commit Graph

126 Commits

Author SHA1 Message Date
Nathan Lanza
dd3cbf0b64 Add architecture specific path variables to SwiftConfigureSDK
New variables are introduced to track the path for the architecture
specific subdirectories

This work is mostly attributed to Zach Bowling
2018-03-20 16:20:43 -07:00
Bob Wilson
15ac679694 master-next: fix PR13574 for Linux
Set the deployment target to an empty string for non-Darwin platforms
so that it is safe to append to the target triple without guarding it
with a check for Darwin.
2017-12-21 08:33:18 -08:00
Bob Wilson
b7981aa6ea master-next: Set the deployment version correctly in -target options.
This change leaves in place the use of -m*-version-min options, but
fixes the -target options to match. We can eventually remove the use of
the -m*-version-min options after everyone has moved to build with
versions of Clang that correctly handle the deployment version in the
-target option.
2017-12-20 23:15:44 -08:00
Saleem Abdulrasool
2f9f585b57 build: special case Windows ARM target
Windows ARM NT (the modern, non-Windows CE environment) is a pure thumb2
environment.  The frontend does not canonicalise the target like in
clang.  Ensure that we map the triple by hand to the desired target
triple.
2017-10-15 12:10:58 -07:00
Saleem Abdulrasool
27d051a6c3 build: improve the Windows build infrastructure
Rather than use the `INCLUDE` and `LIB` environment variables to build
the Windows code, use the `UniversalCRTSdkDir`, `UCRTVersion`, and
`VCToolsInstallDir` variables.  Using these we can compute the right set
of include directories and library search paths for the various
architectures.  This will enable us to build multiple variants of the
Windows stdlib at the same time.

Additionally, rather than relying on the magic environment variables to
be processed by the driver, pass them explicitly to the driver through
the build system.  This also is needed to allow parallel builds of
various architecture variants of the stdlib on Windows.
2017-09-23 16:08:42 -07:00
Gonzalo Larralde
443e7614e4 Fixes on linker executable variables per target.
* `prefix` should be `sdk` in runtime cmake list file
* typo on variable existence checking
2017-03-07 10:00:58 -03:00
Saleem Abdulrasool
125e882c8c build: permit overriding the linker
When cross-compiling for android ARM, it is possible that the system
linker does not support the target.  However, in order to cross-compile
the target runtime, we need to adjust the linker to the target linker.
If one is not specified, fall back to the current behaviour of using the
system linker.
2017-02-26 11:25:07 -08:00
Hugh Bellamy
e201d93485 Add support for Windows in the root CMakeLists.txt file 2016-12-28 14:46:18 +00:00
Saleem Abdulrasool
5e170ebcb5 build: support cross-compiling to windows 2016-07-13 21:37:04 -07:00
Saleem Abdulrasool
b1978d5144 build: track object format with SDK 2016-06-22 09:37:56 -07:00
SpringsUp
8c7da8d082 Refactored host/target SDK detection to support cross-compiling 2016-05-18 07:24:47 +02:00
David Farler
d9bbb6caf0 Remove checks and references to internal Apple SDKs.
These aren't available for use outside of Apple.

rdar://problem/23302539
2015-11-16 16:07:55 -08:00
Dmitri Hrybenko
c1678ff361 CMake: DARWIN_USE_INTERNAL_SDK: Actually use the internal SDK
Swift SVN r32361
2015-10-01 03:21:54 +00:00
Dmitri Hrybenko
e475fa0ae2 CMake: when looking for an internal SDK, check for the 'PrivateFrameworks' dir
Swift SVN r32333
2015-09-30 01:50:38 +00:00
Dmitri Hrybenko
26e5be03b7 CMake: add an option that forces the use of internal SDK
rdar://22866512

Swift SVN r32316
2015-09-29 22:59:00 +00:00
Sonny Falk
a24c051e52 CMake: Cross compiling requires internal SDK.
Refactor configure_sdk_darwin(), remove the "internal" parameter since all calls are the same, make it respect SWIFT_USE_INTERNAL_SDK instead.

Make it use the internal SDK only if cross compiling tools, since it's required.

Swift SVN r31509
2015-08-26 22:43:01 +00:00
Arnold Schwaighofer
f6224bd3f0 Allow libraries to specify to be compiled against the internal variant of the SDKs
We will need this to switch the darwin targets over to use ICU instead of going
to NSString for string operations. The public SDK does not contain the headers
for ICU - only the dylib.

For builds using a public SDK users can specify the path to an ICU install where
the headers can be found. If this path is specified the logic will not use
internal SDK variants.

Swift SVN r31471
2015-08-26 02:55:45 +00:00
David Farler
9e4d52c9cb Reinstate watchOS and other SDK overlays to build against the public SDKs.
Un-revert the below commits with the following addition:
add declarations for posix_spawn related APIs to SwiftPrivateDarwinExtras.
posix_spawn-related APIs aren't available in the public SDKs, so force past
the availability by creating our own stubs in the internal DarwinExtras
library.

r31244, r31245

CMake: build all platforms except watchOS using the public SDK

Covers rdar://problem/21145996.
A step towards rdar://problem/21099318.

Switch SDK overlays to use the public SDK

I had to cut the dependency on CrashReporterClient.h and reimplement
some of that code inline in the Swift runtime.  This shoud be OK (even
though not very clean), since the layout of CrashReporter sections is
ABI.

rdar://21099318

Swift SVN r31252
2015-08-14 22:09:49 +00:00
Dmitri Hrybenko
c75fc00cec Revert "CMake: build all platforms except watchOS using the public SDK"
This reverts commit r31244.  It broke the buildbot.

Swift SVN r31247
2015-08-14 18:56:15 +00:00
Dmitri Hrybenko
dd38372fb7 CMake: build all platforms except watchOS using the public SDK
Covers rdar://problem/21145996.
A step towards rdar://problem/21099318.

Swift SVN r31244
2015-08-14 17:26:04 +00:00
Mish Awadah
10bdef0936 Revert "CMake: build all platforms except watchOS using the public SDK"
This reverts commit cd3f1ba7d1ee2397817e1a165209fdeab8a1c004.

Reverting this b/c it is breaking buildbots with the following:
CMake Error at CMakeLists.txt:522 (message):
  CrashReporterClient library is required, but it was not found

Swift SVN r31047
2015-08-06 06:12:23 +00:00
Dmitri Hrybenko
271acdfcab CMake: build all platforms except watchOS using the public SDK
Covers rdar://problem/21145996.
A step towards rdar://problem/21099318.

Swift SVN r31041
2015-08-06 04:28:05 +00:00
Greg Parker
039ebc97d2 [build] Fix typo in SWIFT_SDK_*_VERSION.
Swift SVN r26937
2015-04-03 08:02:08 +00:00
Greg Parker
b855ee64d8 [build] Print Xcode and SDK build numbers during configuration.
Swift SVN r26936
2015-04-03 08:01:13 +00:00
David Farler
544ef4002d Merge tvOS and watchOS Support
- Add frontend and standard library build support for tvOS.
- Add frontend support for watchOS.

watchOS standard library builds are still disabled during SDK bring-up.

To build for TVOS, specify --tvos to build-script.
To build for watchOS, specify --watchos to build-script (not yet supported).

This patch does not include turning on full tests for TVOS or watchOS, and
will be included in a follow-up patch.

Swift SVN r26278
2015-03-18 21:35:07 +00:00
Dmitri Hrybenko
6670bb76ec Rewrite the CMake build system
Swift SVN r24124
2014-12-23 22:15:30 +00:00