Commit Graph

115 Commits

Author SHA1 Message Date
Greg Parker
da14cd79a6 [runtime] Clean up symbol exports in libc functions. (#13202) 2017-12-01 17:49:11 -08:00
Mark Lacey
1236b4ece5 Another fix for an initialization using a cast involving an IUO.
Like the change in cbca1f23f6, this is not
allowed under SE-0054.
2017-11-06 08:34:42 -08:00
Mark Lacey
cbca1f23f6 Rework an initialization to remove a use of an IUO that was banned by SE-0054. 2017-10-26 18:13:03 -07:00
Calvin Hill
aee81d272f Add Initial platform support for Haiku. (#11583) 2017-09-22 21:06:56 -04:00
Guillaume Lessard
7b30d1ef94 add /usr/include/sysexits.h to Glibc module (#11926)
It is part of the Darwin module; this makes things more consistent.
2017-09-17 18:48:10 -04:00
Robert Widmann
0cf1b52452 Treat Cygwin as a separate OS
Cygwin is considered a distinct target with a distinct ABI, environment
conditions, and data types.  Though the goal of the project is
native Windows integration with UNIX-likes, that is not compatible with
the idea that the platform can be ignored as Win-like enough to have the
existing os(Windows) condition apply.
2017-06-28 13:31:05 -07:00
Max Moiseev
e2788fd6eb Fix access level for extern_proc.p_starttime
Fixes: <rdar://problem/31549450>
2017-06-16 11:39:35 -07:00
Max Moiseev
9b53efd72c Merge branch 'master' into new-integer-protocols 2017-04-17 09:53:44 -07:00
Ted Kremenek
c18b4be544 Add shim for extern_proc's p_starttime.
This constant is not imported by the ClangImporter:

  #define p_starttime p_un.__p_starttime

Add a shim to do the same thing.

Fixes rdar://problem/31549450
2017-04-13 09:47:14 -07:00
Max Moiseev
835b8809d2 Merge branch 'master' into new-integer-protocols 2017-03-07 16:18:54 -08:00
Michael Gottesman
8437819b5a [CMake] Revert recent changes.
These changes caused a number of issues:

1. No debug info is emitted when a release-debug info compiler is built.
2. OS X deployment target specification is broken.
3. Swift options were broken without any attempt any recreating that
functionality. The specific option in question is --force-optimized-typechecker.

Such refactorings should be done in a fashion that does not break existing
users and use cases.

This reverts commit e6ce2ff388.
This reverts commit e8645f3750.
This reverts commit 89b038ea7e.
This reverts commit 497cac64d9.
This reverts commit 953ad094da.
This reverts commit e096d1c033.

rdar://30549345
2017-02-15 22:26:06 -08:00
Chris Bieneman
e096d1c033 [CMake] Simplify add_swift_library
This patch splits add_swift_library into two functions one which handles
the simple case of adding a library that is part of the compiler being
built and the second handling the more complicated case of "target"
libraries, which may need to build for one or more targets.

The new add_swift_library is built using llvm_add_library, which re-uses
LLVM's CMake modules. In adapting to use LLVM's modules some of
add_swift_library's named parameters have been removed and
LINK_LIBRARIES has changed to LINK_LIBS, and LLVM_LINK_COMPONENTS
changed to LINK_COMPONENTS.

This patch also cleans up libswiftBasic's handling of UUID library and
headers, and how it interfaces with gyb sources.

add_swift_library also no longer has the FILE_DEPENDS parameter, which
doesn't matter because llvm_add_library's DEPENDS parameter has the same
behavior.
2017-02-14 14:28:10 -08:00
Saleem Abdulrasool
08751a8bb2 stdlib: add sys.user module for Linux
sys/user.h provides definitions for registers.  It would previously get
merged into the sys module which could result in it being multiply
included (as in the case of libdispatch).  Add an explicit submodule.
Noticed when building libdispatch on Linux AArch64.
2017-02-11 14:50:56 -08:00
Max Moiseev
d128ed42b0 Merge remote-tracking branch 'origin/master' into new-integer-protocols 2017-01-19 14:16:32 -08:00
Joe Groff
808d4d7e51 Merge pull request #4788 from amraboelela/glibc.modulemap.gyb
Added module ifaddrs
2017-01-17 14:36:24 -08:00
Han Sangjin
a8dec7fa43 [stdlib] Fixed for Cygwin
- CYGWIN symbol is used to distinguish Cygwin environment from other OS
  and other environment in Windows.
- Added windows and windowsCygnus to OSVersion in StdlibUnittest
2017-01-17 02:31:16 +09:00
Stephen Canon
6ff95dad03 Mark several C macros imported from <float.h> as deprecated. (#6796)
* Mark several C macros imported from <float.h> as deprecated.

These macros all have straightforward replacements in terms of static properties on FloatingPoint or BinaryFloatingPoint. It is necessary to add 1 in a few places because of differences between how C and Swift count significand bits and normalize the significand, but this is expected to have minimal impact on code in practice (and when it does have impact, using the Swift definition is generally simpler).

* Address review notes from @moiseev.

This fixes <rdar://problem/27871465>
2017-01-13 21:33:43 -05:00
Max Moiseev
a1c5a0b528 Deprecating M_SQRT2 and M_SQRT1_2
Now that square root is being propoerly inlined and optimized away, it
is safe to deprecate these two constants in favor of a Swiftier API.

Fixes: <rdar://problem/30003973>
2017-01-13 10:40:28 -08:00
Maxim Moiseev
0d0dc79ce8 Deprecating M_PI and a few other constants in favor of better API (#6764)
* Deprecating M_PI and a few other constants in favor of better API

Deprecating `M_PI`, `M_PI_2`, `M_PI_4`.
Sugesting using `Double.pi` or even just `.pi` to allow type be inferred
and avoid a type-cast.

Fixes: <rdar://problem/26602190>
2017-01-12 16:36:08 -08:00
Max Moiseev
fa7368ad7d Merge remote-tracking branch 'origin/master' into new-integer-protocols 2017-01-11 14:37:01 -08:00
Robert Widmann
cde11ae1ee Resolve comments from last code review 2017-01-10 10:45:18 -07:00
Alsey Coleman Miller
8157194e83 [stdlib] Added POSIXErrorCode for Linux 2017-01-10 10:40:00 -07:00
swift-ci
294359bd69 Merge pull request #4804 from kstaring/master 2017-01-10 00:01:46 -08:00
Max Moiseev
27889c6376 Merge remote-tracking branch 'origin/master' into new-integer-protocols 2017-01-06 15:54:44 -08:00
practicalswift
6d1ae2a39c [gardening] 2016 → 2017 2017-01-06 16:41:22 +01:00
Max Moiseev
3276aa5bcf Merge remote-tracking branch 'origin/master' into new-integer-protocols 2016-12-19 13:15:50 -08:00
Saleem Abdulrasool
96974a2179 Windows: add a ucrt.io module
This module covers the ucrt corecrt_io.h header.  We can further refine
the module if necessary later.
2016-12-17 16:37:41 -08:00
Max Moiseev
3059b3cdd1 Merge branch 'master' into new-integer-protocols 2016-11-30 10:45:10 -08:00
Max Moiseev
70b2343626 Merge branch 'master' into new-integer-protocols 2016-11-28 15:25:01 -08:00
practicalswift
5bc293cc09 [gardening] Add missing licensing headers. 2016-11-28 21:40:06 +01:00
Saleem Abdulrasool
f238d65a33 stdlib: use ALL_APPLE_PLATFORMS where applicable
Convert a few instances of fully listing all apple platforms with the special
`ALL_APPLE_PLATFORMS` value for `TARGET_SDKS`.
2016-11-27 14:33:06 -08: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
K Staring
fb70a1bfad incoorporate @jeremyandrews' suggestion 2016-10-22 12:00:36 +02:00
K Staring
8bda672c70 Merge branch 'master' of https://github.com/apple/swift 2016-10-15 18:36:36 +02:00
Max Moiseev
9428c826bd Merge remote-tracking branch 'origin/master' into new-integer-protocols 2016-10-10 14:07:28 -07:00
Ankit Aggarwal
e7a6ce07ab [GlibcModuleMap] Add sys/file.h to glibc modulemap 2016-10-05 12:35:47 +05:30
K Staring
69085ae4eb Merge branch 'master' of https://github.com/apple/swift 2016-09-29 07:24:25 +02:00
Max Moiseev
6803cda05c Merge branch 'master' into new-integer-protocols 2016-09-26 11:39:46 -07:00
Maxim Moiseev
69b3cc0946 [overlay] Declaring MAP_FAILED (#4971)
Clang importer is unable to handle `((void *)-1)`, therefore manually
declaring the said constant in both Darwin and Glibc modules.

rdar://problem/26689135
2016-09-23 14:48:48 -07:00
K Staring
7edc3100bf fix unbalanced '% if'/'% end', found by gribozavr 2016-09-22 20:28:10 +02:00
Max Moiseev
ea8e0f0e15 Merge remote-tracking branch 'origin/master' into new-integer-protocols 2016-09-21 14:48:35 -07:00
swift-ci
88741f93c6 Merge pull request #4899 from Nirma/gardening_mach_error 2016-09-21 10:42:24 -07:00
Nicholas Maccharoli
384b2e3b83 [gardening] fix enum value spacing 2016-09-21 18:03:22 +09:00
K Staring
7c50ccde5e fix cut/paste typo 'CMAKE_SDK != "FreeBSD"' to 'CMAKE_SDK in ["FreeBSD"]' (assuming some time more kqueue-supported platforms will want to support Swift) 2016-09-20 03:53:36 +02:00
K Staring
98a8b58957 add //FIXME for FreeBSD outcommented code, add sys/event.h for kqueue (untested) 2016-09-20 03:46:35 +02:00
K Staring
b267fda3c8 Merge branch 'master' of https://github.com/apple/swift 2016-09-18 13:09:34 +02:00
practicalswift
3a4ee89034 [gardening] Use consistent formatting. 2016-09-17 12:12:49 +02:00
K Staring
4dbf4de036 don't try to link "dl" on FreeBSD 2016-09-16 20:49:22 +02:00
Amr Aboelela
dbca4f031a Added module ifaddrs 2016-09-14 17:47:11 -07:00
K Staring
afc95a5e2a disable handy pthread wrappers on FreeBSD since they don't compile
Things like: PthreadBarriers.swift:114:50: error: cannot convert value of type 'UnsafeMutablePointer<pthread_mutex_t>' (aka 'UnsafeMutablePointer<OpaquePointer>') to expected argument type 'UnsafeMutablePointer<pthread_mutex_t?>' (aka 'UnsafeMutablePointer<Optional<OpaquePointer>>')
on barrier.pointee.mutex . I need to do more research to understand this
2016-09-13 11:08:00 +02:00