152 Commits

Author SHA1 Message Date
swift-ci
ed38fe6251 Merge remote-tracking branch 'origin/master' into master-next 2019-06-04 10:09:06 -07:00
Joe Groff
4ed8de10f9 Revert "Revert "Use autolinking to pull in compatibility libraries."" 2019-06-03 20:10:51 -07:00
swift-ci
fd329da063 Merge remote-tracking branch 'origin/master' into master-next 2019-06-03 14:29:47 -07:00
Joe Groff
a7cc3a38cc Revert "Use autolinking to pull in compatibility libraries." 2019-06-03 14:18:39 -07:00
swift-ci
40c3c8caa5 Merge remote-tracking branch 'origin/master' into master-next 2019-06-03 08:30:09 -07:00
Joe Groff
dffd1b27a1 Use autolinking to pull in compatibility libraries.
Many build systems that support Swift don't use swiftc to drive the linker. To make things
easier for these build systems, also use autolinking to pull in the needed compatibility
libraries. This is less ideal than letting the driver add it at link time, since individual
compile jobs don't know whether they're building an executable or not. Introduce a
`-disable-autolink-runtime-compatibility` flag, which build systems that do drive the linker
with swiftc can pass to avoid autolinking.

rdar://problem/50057445
2019-05-31 13:11:14 -07:00
Saleem Abdulrasool
a75e8fbd21 Basic: adjust for LLVM SVN r357552
`Emscripten` is now an OS in the enumeration.
2019-04-03 09:40:07 -07:00
swift-ci
2a8c973aff Merge remote-tracking branch 'origin/master' into master-next 2019-02-28 16:09:52 -08:00
Brent Royal-Gordon
64760981d0 [NFC] Restyle getTargetSpecificModuleTriple()
* Adds documentation comments.
* Turns redundant cases into comments.
* Removes the else branch in a couple “if (…) return …; else return …;” patterns.
2019-02-27 11:44:10 -08:00
Brent Royal-Gordon
c1cc51d1f3 Use target triple for “universal” modules
When loading a module supporting multiple targets, the module loader now looks for a file named with a normalized version of the target triple first, and only falls back to the architecture name if the normalized triple is not found.
2019-02-27 11:43:12 -08:00
Bob Wilson
93b29dcc89 master-next: Add switch case for new Hurd triple in llvm r347832 2019-02-08 14:22:56 -08:00
Bob Wilson
411fae3e5e [master-next] Add HermitCore OS type for LLVM triples
LLVM r340675 added a new HermitCore OS type to triples, which broke the
Swift build because it is using -Werror,-Wswitch and the new value was not
handled in swift::getPlatformNameForTriple
2019-02-07 16:52:45 -08:00
Davide Italiano
35968ed6bc [Platform] Catch up with LLVM upstream. COWS is now WASI. 2019-01-16 10:25:30 -08:00
Adrian Prantl
5a9a59ec6a Add missing enum case 2019-01-15 11:01:33 -08:00
Bob Wilson
fa5ee3d717 master-next: Add switch case for new Hurd triple in llvm r347832 2018-11-29 12:56:14 -08:00
swift-ci
d5b96980be Merge remote-tracking branch 'origin/master' into master-next 2018-09-14 09:09:31 -07:00
Saleem Abdulrasool
d281b98220 litter the tree with llvm_unreachable
This silences the instances of the warning from Visual Studio about not all
codepaths returning a value.  This makes the output more readable and less
likely to lose useful warnings.  NFC.
2018-09-13 15:26:14 -07:00
Bob Wilson
8aa01ec974 [master-next] Add HermitCore OS type for LLVM triples
LLVM r340675 added a new HermitCore OS type to triples, which broke the
Swift build because it is using -Werror,-Wswitch and the new value was not
handled in swift::getPlatformNameForTriple
2018-08-27 10:37:20 -07:00
Jordan Rose
d11704bcc9 Add swift::getNonSimulatorPlatform for DarwinPlatformKind
And use it in getDarwinLibraryNameSuffixForTriple, making the logic
there clearer.

Suggested by David U!
2018-07-11 15:09:53 -07:00
swift-ci
4815c1a745 Merge remote-tracking branch 'origin/master' into master-next 2017-11-28 19:50:29 -08:00
Graydon Hoare
d3613b8017 [Platform] Support triple.isSimulatorEnvironment() 2017-11-28 13:51:01 -08:00
Michael Gottesman
b369760f43 [upstream-update] Add AMDPAL to getPlatformNameForTriple switch. 2017-10-01 23:22:36 -07:00
swift-ci
a448d28b77 Merge remote-tracking branch 'origin/master' into master-next 2017-09-22 18:09:44 -07:00
Calvin Hill
aee81d272f Add Initial platform support for Haiku. (#11583) 2017-09-22 21:06:56 -04:00
Bob Wilson
213965b629 [master-next] Reapply change to remove Bitrig platform.
This reverts commit 35cbd7e847.
2017-08-03 17:11:42 -07:00
Bob Wilson
35cbd7e847 Roll-back part of master-next change 63a9943a46
The swift-4.1-branch of LLVM still has the Bitrig platform.
2017-08-03 14:12:37 -07:00
Jordan Rose
63a9943a46 Trivial updates for upstream LLVM changes.
- BitRig is gone
- llvm::enumerate's element type now uses methods instead of fields

No intended functionality change.
2017-07-25 14:11:03 -07:00
Bob Wilson
951e26323e Add case for Ananas OS to fix warning after LLVM r306237. 2017-07-05 11:56:00 -07:00
Hugh Bellamy
2c1bc3c822 Fix warnings for unhandled triples after LLVM upstream update
> warning C4062: enumerator 'llvm::Triple::Fuchsia' in switch of enum
'llvm::Triple::OSType' is not handled
> warning C4062: enumerator 'llvm::Triple::Contiki' in switch of enum
'llvm::Triple::OSType' is not handled
> warning C4062: enumerator 'llvm::Triple::LastOSType' in switch of enum
'llvm::Triple::OSType' is not handled
2017-01-26 10:11:34 +00:00
Han Sangjin
b8dd577693 [swiftc] Fixed for Cygwin
Fixed for the difference of Cygwin with other Windows variants (MSVC,
Itanium, MinGW).

- The platform name is renamed to "cygwin" from "windows" which is used
  for searching the standard libraries.

- The consideration for DLL storage class (DllExport/DllImport) is not
  required for Cygwin and MinGW. There is no problem when linking in
  these environment.

- Cygwin should use large memory model as default.(This may be changed
  if someone ports to 32bit)

- Cygwin and MinGW should use the autolink feature in the sameway of
  Linux due to the linker's limit.
2017-01-19 05:48:24 +09:00
practicalswift
6d1ae2a39c [gardening] 2016 → 2017 2017-01-06 16:41:22 +01:00
practicalswift
797b80765f [gardening] Use the correct base URL (https://swift.org) in references to the Swift website
Remove all references to the old non-TLS enabled base URL (http://swift.org)
2016-11-20 17:36:03 +01:00
Michael Gottesman
636311072c [gardening] Eliminate warning from build due to uncovered switch. 2016-10-19 10:49:15 -07:00
Saleem Abdulrasool
83901998c9 Port for PS4
Add support for the PS4 OS.  Update the standard library and add a target unit
test.
2016-06-30 20:14:50 -07:00
Saleem Abdulrasool
0cf0786481 Basic: use switch instead of cascading if's
Rather than have a series of cascading if conditionals, use a switch.  Although
Darwin and android are special, they can be handled just as cleanly in the
switch version.  NFC.
2016-06-27 12:02:45 -07:00
Ryan Lovelett
0c0bcbb094 Convert "armv7l" to "armv7" for the architecture component of paths (#2369)
On the Raspberry Pi 2 when trying to import Glibc, without this patch, it will attempt to
find the module map at "/usr/lib/swift/linux/armv7l/glibc.modulemap" and
fail to do so.

With this patch it will attempt to find the module map at
"/usr/lib/swift/linux/armv7/glibc.modulemap" where it will succeed in
finding the module map.

Similar behavior currently happens in the Driver and Frontend. To DRY up
this behavior it has been extracted to the Swift platform.
2016-05-02 15:25:58 -07:00
Zhuowei Zhang
7c502b6344 Port to Android
This adds an Android target for the stdlib. It is also the first
example of cross-compiling outside of Darwin.

Mailing list discussions:

1. https://lists.swift.org/pipermail/swift-dev/Week-of-Mon-20151207/000171.html
2. https://lists.swift.org/pipermail/swift-dev/Week-of-Mon-20151214/000492.html

The Android variant of Swift may be built using the following `build-script`
invocation:

```
$ utils/build-script \
  -R \                                           # Build in ReleaseAssert mode.
  --android \                                    # Build for Android.
  --android-ndk ~/android-ndk-r10e \             # Path to an Android NDK.
  --android-ndk-version 21 \
  --android-icu-uc ~/libicu-android/armeabi-v7a/libicuuc.so \
  --android-icu-uc-include ~/libicu-android/armeabi-v7a/icu/source/common \
  --android-icu-i18n ~/libicu-android/armeabi-v7a/libicui18n.so \
  --android-icu-i18n-include ~/libicu-android/armeabi-v7a/icu/source/i18n/
```

Android builds have the following dependencies, as can be seen in
the build script invocation:

1. An Android NDK of version 21 or greater, available to download
   here: http://developer.android.com/ndk/downloads/index.html.
2. A libicu compatible with android-armv7.
2016-04-12 19:26:21 -04:00
practicalswift
ea0ac3ac67 [gardening] Remove all tabs in C++ code 2016-04-08 21:22:57 +02:00
AnnaZaks
767d9ca914 Merge pull request #1434 from apple/asan
[asan] Add basic support for Address Sanitizer function instrumentation
2016-02-29 18:58:40 -08:00
zaks
2110235fd3 [asan] Cleanup based on Jordan's review comments 2016-02-26 16:02:40 -08:00
zaks
f049c24a02 Introduce a helper to make switching on darwin platforms less error prone
Introduce DarwinPlatformKind, which would allow us to switch on darwin
platforms instead of copying and pasting the brittle logic in several places.
Use the helper method to simplify ClangImporter.
2016-02-23 19:09:25 -08:00
Han Sangjin
e06c7136cb Porting to Cygwin. rebased and squashed 2016-02-22 13:20:21 +09:00
practicalswift
8efa5f587e [gardening] Remove "-*- C++ -*-" tag from .cpp files
Emacs assumes .h files are C files by default which is why the
tag "-*- C++ -*-" is needed.

.cpp files do not have this problem.
2016-01-23 12:09:32 +01:00
practicalswift
1339b5403b Consistent use of header comment format.
Correct format:
//===--- Name of file - Description ----------------------------*- Lang -*-===//
2016-01-04 13:26:31 +01:00
Zach Panzarino
e3a4147ac9 Update copyright date 2015-12-31 23:28:40 +00:00
Landon Fuller
6bf5a4989e Add FreeBSD Option handling. 2015-12-04 12:26:39 -07:00
Dmitri Gribenko
4324e7c903 Remove conditional compilation of tvOS 2015-12-01 14:43:45 -07:00
Devin Coughlin
6374588f3d [IRGen] Mark Objective-C Watch simulator images as simulated in IRGen setModuleFlags().
We already do for the iOS simulator and the tvOS simulator. This fixes
the 'unrecognized selector sent to instance’ bridging crashes in the stdlib
watch simulator tests.

Greg Parker did the hard work of tracking this down and suggested the fix.

<rdar://problem/20932146>

Swift SVN r28846
2015-05-20 20:39:42 +00:00
Dmitri Hrybenko
ea17483633 Add CMake options and #ifs to hide tvOS
Swift SVN r28752
2015-05-19 05:15:52 +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