Commit Graph

430 Commits

Author SHA1 Message Date
Nathan Lanza
7429856034 Change various search and linker paths to account for changes in NDK16
ndk14 introduced "unified headers" which merged the headers for all
different API versions into one directory which effectively split the
"SWIFT_SDK_ANDROID_ARCH_${ARCH}_PATH" into two different directories.

Add include and library specific paths to various compilation and link
invocations across the Swift project to account for this change. Remove
some broken sysroot/sdk specific settings.
2018-05-02 14:18:11 -07:00
Saleem Abdulrasool
a0fea45957 Windows: further improve module maps
Further enhance the modulemaps.  This is needed to support the use of
the ucrt for the builtins as used in the ClangImporter unit tests.
2018-04-30 12:08:36 -07:00
Nathan Lanza
8649b2137e Remove lgamma from Android in tgmath
Remove lgamma from Android in tgmath.swift.gyb.
2018-04-23 13:47:16 -07:00
Saleem Abdulrasool
f6dcc22598 platform: enhance the VisualC modulemap
Add the `vadefs` and `stdint` submodules.  These are required to get the
importing of the standard types (`intmax_t` and `uintptr_t`) correct
with the Visual C runtime.  This allows building the libdispatch Swift
overlay.
2018-04-04 14:27:54 -07:00
Nathan Lanza
e06c52584f Change various uses of SWIFT_SDK_${SDK}_PATH to its architecture specific vairant
Cross-compilation for multiple architectures & sdks require various
variables to be split to specify the arch/adk variant being focused on.
This change modifies various uses of the `SWIFT_SDK_${SDK}_PATH` to
`SWIFT_SDK_${SDK}_ARCH_${ARCH}`
2018-03-30 17:50:59 +00:00
Jordan Rose
05293f26b6 [stdlib] Remove '@_frozen' from enums that shouldn't be frozen
Error codes, FloatingPointRoundingRule, Mirror.AncestorRepresentation,
Mirror.DisplayStyle, and PlaygroundQuickLook.
2018-03-20 14:50:40 -07:00
Jordan Rose
9034ba617b Ban @_fixed_layout on enums in favor of @_frozen
In theory there could be a "fixed-layout" enum that's not exhaustive
but promises not to add any more cases with payloads, but we don't
need that distinction today.

(Note that @objc enums are still "fixed-layout" in the actual sense of
"having a compile-time known layout". There's just no special way to
spell that.)
2018-03-20 14:49:10 -07:00
Stephen Canon
d3cb915abb Updates to tgmath functions for CGFloat (#15360)
* Updates to tgmath functions for CGFloat

These changes bring CGFloat in line with the other FloatingPoint types.  Some of this stuff is now defined at the protocol level, so we can get rid of it at the concrete type level.  A couple other functions have been deprecated for all types, with protocol or tgmath replacements.
2018-03-20 11:14:57 -04:00
Stephen Canon
ddf70fa199 Cleanup tgmath wrappers. (#15304)
* Cleanup tgmath wrappers.

- Remove special-case gyb logic for lgamma on Darwin; the symbols we need are always present, even if not visible in the headers, so we only need a prototype.
- Add some deprecations for symbols that have direct stdlib analogues.
- Make some operations generic on [Binary]FloatingPoint, where they can map to the protocols instead of calling libm.
- Mark ldexp(Float/Double) renamed to scalbn; for binary formats these are identical functions, and we don't really want to use these names for hypothetical future Decimal support, as they're not Swifty.
2018-03-17 10:32:13 -04:00
Sho Ikeda
a3f9a4c408 Fix a comment in MachError.swift 2018-03-14 13:57:00 +09:00
Sho Ikeda
1fbc03005e [gardening][stdlib/public] Move operators into types 2018-03-11 12:14:56 +09:00
Sho Ikeda
e5223e4826 [stdlib/public][gardening] Prefer os(macOS) over os(OSX) 2018-03-09 09:10:35 +09:00
Vivian Kong
4498b2852b Fix importer support for Float80 - add missing #if block 2018-03-08 12:45:44 -05:00
Stephen Canon
f8a9e56957 Importer support for float80 (#14971)
* First pass at implementing support for mapping between long double and Float80.

* Only define CLongDouble on platforms where I know what it is.

* remove some hacks that are no longer necessary.
2018-03-07 16:49:21 -05:00
Max Moiseev
5650f80937 [stdlib] Annotate types with @_fixed_layout
This will allows us to build the standard library in resilient mode by
default, hopefully, without performance regression.

<rdar://problem/36362648>
2018-01-09 14:46:30 -08:00
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