Commit Graph

777 Commits

Author SHA1 Message Date
Saleem Abdulrasool
ac57b66c99 Merge pull request #6820 from hughbe/extern-c
Introduce SWIFT_EXTERN_RUNTIME_EXPORT for Windows
2017-01-24 19:34:44 -08:00
practicalswift
a9d6d8938c [gardening] Fix recently introduced typos 2017-01-22 20:40:45 +01:00
Hugh Bellamy
a5a4880075 Remove extern "C" uses of SWIFT_RT_ENTRY_VISIBILITY 2017-01-22 18:32:17 +00:00
Hugh Bellamy
05a50fd978 Remove extern "C" from uses of SWIFT_RUNTIME_STDLIB_INTERFACE 2017-01-22 18:32:17 +00:00
Hugh Bellamy
63cf2d561e Remove extern "C" from uses of SWIFT_RUNTIME_EXPORT 2017-01-22 18:32:17 +00:00
practicalswift
7e48c04277 [gardening] Fix inconsistent headers. 2017-01-21 10:59:10 +01:00
practicalswift
95e47eceb7 [gardening] Fix a vs an typos. 2017-01-21 10:47:25 +01:00
Slava Pestov
230b50263e Merge pull request #6940 from hughbe/crash-client-hidden
Remove CRASH_REPORTER_CLIENT_HIDDEN in favour of equivilent LLVM macro
2017-01-20 20:28:44 -08:00
Hugh Bellamy
4e55214c18 Remove CRASH_REPORTER_CLIENT_HIDDEN in favour of equivilent LLVM macro 2017-01-20 13:48:56 +00:00
Hugh Bellamy
0b9685cbd7 Fix warnings on all platforms for cygwin specific code. 2017-01-20 12:58:47 +00:00
Joe Groff
e9efff1021 Merge pull request #6399 from spevans/pr_elf_static_binary_dladdr
[runtime] Implement lookupSymbol() for ELF static executables
2017-01-17 17:03:00 -08:00
Simon Evans
223a607639 [runtime] StaticBinaryELF review fixes
- Use llvm::Optional to avoid heap allocations and
  eliminate redundant ivars.
2017-01-17 22:45:22 +00: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
Simon Evans
0ef3f65e34 [runtime] StaticBinaryELF safety fixes 2017-01-16 14:07:18 +00:00
Joe Groff
ecfa78a3cc Runtime: Look through artificial ObjC subclasses when building demangle trees for classes.
Fixes rdar://problem/29962114, a regression in presenting the stringified names of ObjC classes that have been dynamically subclassed by KVO.
2017-01-11 20:12:16 -08:00
Simon Evans
22b5e6d57b [runtime] Implement lookupSymbol() for ELF static executables 2017-01-09 10:56:29 +00:00
practicalswift
30a88d38e6 [gardening] Fix recently introduced typos 2017-01-06 21:16:02 +01:00
practicalswift
6d1ae2a39c [gardening] 2016 → 2017 2017-01-06 16:41:22 +01:00
practicalswift
b253b21014 [gardening] Make sure argument names in comments match the actual parameter names 2016-12-21 22:56:01 +01:00
Saleem Abdulrasool
75533d9dac Merge pull request #6385 from hughbe/runtime
Fix building the runtime from Windows
2016-12-21 10:02:22 -08:00
Joe Groff
2e0cb9c0a2 Runtime: getDynamicType can't drill into existentials when producing a concrete metatype.
For a value of an opaque generic type `<T> x: T`, the language currently defines `type(of: x)` and `T.self` as both producing a type `T.Type`, and the result of substituting an existential type by `T == P` gives `P.Protocol`, so the `type(of:)` operation on `x` can only give the concrete protocol metatype when `x` is an existential in this case. The optimizer understood this rule, but the runtime did not, causing SR-3304.
2016-12-19 11:03:52 -08:00
Hugh Bellamy
7b66b579b1 Add various unreachable annotations to the runtime 2016-12-19 15:54:50 +00:00
Hugh Bellamy
f9671180da Fix build errors compiling ImageInspectionWin32.cpp 2016-12-19 15:54:49 +00:00
Hugh Bellamy
61c83ab5eb Change _MSC_VER conditions to _WIN32 in runtime 2016-12-19 15:54:49 +00:00
practicalswift
9d0b2abfc2 [gardening] Normalize end-of-namespace comments 2016-12-17 22:29:07 +01:00
swift-ci
268c2b668d Merge pull request #6325 from practicalswift/gardening-20161216 2016-12-17 09:19:24 -08:00
practicalswift
38be6125e5 [gardening] C++ gardening: Terminate namespaces, fix argument names, ...
Changes:
* Terminate all namespaces with the correct closing comment.
* Make sure argument names in comments match the corresponding parameter name.
* Remove redundant get() calls on smart pointers.
* Prefer using "override" or "final" instead of "virtual". Remove "virtual" where appropriate.
2016-12-17 00:32:42 +01:00
practicalswift
16d6dce62e [gardening] Fix recently introduced typos. 2016-12-16 21:42:09 +01:00
swift-ci
55bdf5954c Merge pull request #6285 from eeckstein/more-mangling 2016-12-14 17:21:43 -08:00
Greg Parker
8734f21bd9 [runtime] Improve thread-safety of swift_conformsToProtocol(). (#5719) 2016-12-14 16:54:25 -08:00
Erik Eckstein
c34c0e4bbc Mangling: Don’t hardcode the mangling prefixes in symbols selected by SELECT_MANGLING 2016-12-14 16:39:00 -08:00
Erik Eckstein
c73ac007d1 Mangling: support new mangled symbols in ErrorObject.mm 2016-12-13 11:01:58 -08:00
Saleem Abdulrasool
5217db0d73 runtime: clean up unused variable warning
classType is unused without ObjC interop.  Simplify the code a bit by increasing
the scope covered by the SWIFT_OBJC_INTEROP.  It also silences the warning.
2016-12-11 21:42:23 -08:00
practicalswift
76f0fdd670 [gardening] NULL → nullptr 2016-12-09 23:17:54 +01:00
Saleem Abdulrasool
3328592c20 Merge pull request #5942 from compnerd/windows-target-sdks
build: remove `TARGET_SDKS` from the runtime
2016-12-06 08:02:37 -08:00
Erik Eckstein
d93a9fd103 Mangling: use mangling macros for some more symbols in the runtime library 2016-12-05 12:34:25 -08:00
Saleem Abdulrasool
c67a33fbc7 build: remove TARGET_SDKS from the runtime
The runtime and stubs are built for ALL targets, not specific ones.  This allows
us to configure when cross-compiling to Windows again.  Collapse the dual
addition of the swiftRuntime into a single build.  This unifies the runtime
build for the apple and non-Apple SDKs.  The difference here was the ObjC
interop sources.  In order to deal with that unification add a CPP macro to
indicate whether the interop sources should be included or not.
2016-12-03 17:02:44 -08:00
Erik Eckstein
5e6c5a70d7 Mangling: Let the demangler handle the new mangling scheme 2016-12-02 15:55:30 -08:00
Erik Eckstein
9f8b68ae11 Mangling: use macros instead of hard-coded swift symbol names.
This makes it easier to switch between the old and new mangling scheme.
2016-12-02 15:55:30 -08:00
practicalswift
568a3e46ba [gardening] Improve header consistency. 2016-12-02 01:47:38 +01:00
Simon Evans
707588c962 [SR-648] ELF static binary fixes
- Revert the use of SWIFT_RUNTIME_EXPORT in ImageInspectionELF.cpp and
  fix the unittests by explicitly adding the file to the list

- Revert the change of section data names
2016-11-30 18:39:16 +00:00
Simon Evans
1daa3ee1f8 [SR-648] Add option to create statically linked binaries
- Add ImageInspectionStatic.cpp to lookup protocol conformance
  and metadata sections in static binaries

- For Linux, build libswiftImageInspectionShared.a and
  libswiftImageInspectionStatic.a for linking with libswiftCore.a.
  This allows static binaries to be built without linking to
  libdl. libswiftImageInspectionShared (ImageInspectionELF.cpp) is
  automatically compiled into libswiftCore.so

- Adds -static-executable option to swiftc to use along with
  -emit-executable that uses linker arguments in
  static-executable-args.lnk. This also requires a libicu
  to be compiled using the --libicu which has configure options
  that dont require libdl for accessing ICU datafiles

- Static binaries only work on Linux at this time
2016-11-29 13:36:19 +00:00
practicalswift
0b34f20318 Merge pull request #5962 from practicalswift/add-missing-license-headers
[gardening] Add missing licensing headers.
2016-11-29 09:40:39 +01:00
Simon Evans
c17ca759aa [runtime] Add platform independent version of dladdr() / Dl_info
- Win32 does not support dlfcn.h, Dl_info or dladdr() so add
  lookupSymbol() as a wrapper for ELF/MachO/Win32

- Win32 version needs an implementation, currently it just returns
  an error for `cannot lookup address'
2016-11-29 00:05:11 +00:00
practicalswift
5bc293cc09 [gardening] Add missing licensing headers. 2016-11-28 21:40:06 +01:00
Saleem Abdulrasool
44fbfd6e93 runtime: repair windows build
The header `dlfcn.h` does not exist for windows targets, guard the including.
Correct the structure initializers which had the members inverted.  Finally,
include the required `vector` header.
2016-11-27 17:05:19 -08:00
practicalswift
2fe4254cb7 Merge pull request #5878 from practicalswift/https-swift-org
[gardening] Use the correct base URL (https://swift.org) in references to the Swift website
2016-11-22 09:17:57 +01:00
practicalswift
02d88d73ed [gardening] Fix inconsistent headers. 2016-11-20 19:30:20 +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
Slava Pestov
b3bc749d35 stdlib: Linux build fix 2016-11-18 01:13:54 -08:00