Commit Graph

47 Commits

Author SHA1 Message Date
Roman Levenstein
5047e1b475 Enable the serialization of sil_vtables by default and completely remove the -sil-serialize-vtables option
Only sil_vtables of public classes with fixed layout are serialized.
2017-10-21 11:36:12 -07:00
Roman Levenstein
48d9b99675 Remove -sil-serialize-witness-tables flag completely
The functionality is always enabled now and there is no need to have a dedicated flag for it.
2017-10-20 19:45:29 -07:00
Roman Levenstein
5e67f755e0 Remove the -sil-serialize-all option 2017-10-04 14:20:53 -07:00
Calvin Hill
aee81d272f Add Initial platform support for Haiku. (#11583) 2017-09-22 21:06:56 -04:00
Michael Gottesman
ec5a92fd04 Disable some tests this time for real. 2017-07-21 13:14:18 -07:00
Michael Gottesman
ab6a4f5249 Disable some failing tests.
rdar://33358110
2017-07-19 16:25:39 -07: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
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
Dmitri Gribenko
3dc793ce8a StdlibUnittest: add checkStrideable() 2016-08-07 03:57:15 -07:00
Dmitri Gribenko
2d2c76f6ec stdlib: AnyHashable tests: finish tests for CF types 2016-07-28 01:35:58 -07:00
Saleem Abdulrasool
4a4b54ea73 stdlib: clean up framework depends
This is no longer necessary as the imports will correctly create the dependency.
Clean up the unnecessary dependencies.  Noticed by Dimitri Gribenko.
2016-07-10 17:54:36 -07:00
Saleem Abdulrasool
65fd24de5c stdlib: restrict pthreads to POSIX platforms
pthreads is not available on non-POSIX platforms (i.e. Windows).  Restrict the
target platforms that we build SwiftPrivatePthreadExtras and things which depend
on it.
2016-07-08 09:38:02 -07:00
Saleem Abdulrasool
7e229f7247 build: support multiple builds of StdlibUnittest 2016-07-05 17:33:56 -07:00
Robert Widmann
56f495c170 [WIP] Enable leaks tracking
This is part 1 of many to enable leaks tracking in the unit test suite.
 To compile with leak tracking enabled run

swift/utils/build-script -- --swift-runtime-enable-leak-checker
2016-06-28 19:22:54 -07:00
Brian Gesiak
328de9e280 [SR-1738] add_swift_library takes SHARED/STATIC arg
As a first step to allowing the build script to build *only*
static library versions of the stdlib, change `add_swift_library`
such that callers must pass in `SHARED`, `STATIC`, or `OBJECT_LIBRARY`.

Ideally, only these flags would be used to determine whether to
build shared, static, or object libraries, but that is not currently
the case -- `add_swift_library` also checks whether the library
`IS_STDLIB` before performing certain additional actions. This will be
cleaned up in a future commit.
2016-06-16 13:15:58 -04:00
Dmitri Gribenko
a1e73a6b0d CMake: remove dead code 2016-05-31 21:57:07 -07:00
Dave Abrahams
8e4f85277b Merge remote-tracking branch 'refs/remotes/origin/master' into merge 2016-03-29 09:19:34 -07:00
Jordan Rose
cd9114423a Reapply "[StdlibUnittest] Install our own handler for uncaught ObjC exceptions."
This reapplies e6a519f and 86dcce1 by reverting e86d3bd, which reverted
more than it needed to.
2016-03-22 16:24:40 -07:00
Michael Ilseman
e86d3bde6c Revert "[ReconstructType] Fix decl lookup when there are multiple constructors"
This reverts commit 65c86b713d.

I attempted to resolve the merge conflict, but Jordan will need to do
a second check.
2016-03-20 20:00:37 -07:00
Jordan Rose
e6a519fbda [StdlibUnittest] Install our own handler for uncaught ObjC exceptions.
We don't want to be at the whims of the system on what to do with an
uncaught exception; we need to make sure its message gets printed to
stderr so that the parent process can check it.

(There's a bit of trickery here to see if the class looks like an
NSException; otherwise we lose the name of the exception and just get
the reason.)
2016-03-18 13:55:45 -07:00
Dmitri Gribenko
47201398c4 StdlibUnittest: move string convertion assertions to StringConvertible.swift.gyb 2016-03-15 11:33:22 -07:00
Dmitri Gribenko
04ec024808 StdlibUnittest: add CustomPrintableValue type, which will be used to test converting instances to stings 2016-03-14 21:48:03 -07:00
Dmitri Gribenko
509213295a StdlibUnittest: split minimal protocol models into a new file, MinimalTypes.swift.gyb 2016-03-11 10:20:37 -08:00
practicalswift
34188788a1 [gardening] Sort file listings in CMakeLists.txt files 2016-02-27 19:50:30 +01:00
Brian Gesiak
e7c022679d [stdlib] Rename "PrivateDarwin" to "PrivateLibc"
SwiftPrivateDarwinExtras is used by non-Darwin platforms as well; its
name is misleading. Rename it to SwiftPrivateLibcExtras, which is
closer to its actual function.
2016-02-22 11:07:24 -05:00
Dmitri Gribenko
27f422fe39 StdlibUnittest: move logging wrappers for collections to StdlibCollectionUnittest 2016-01-29 19:38:37 -07:00
Dmitri Gribenko
aeeb9c1325 Move collection testing code from StdlibUnittest to a new library
This brings down StdlibUnittest build time to 90 seconds with either
a DebugAssert or a ReleaseAssert compiler.

The new library, StdlibCollectionTests, is only built when running
validation tests.
2016-01-26 18:58:03 -08:00
Dmitri Gribenko
deac7566b0 CMake: remove stale comment 2016-01-25 17:19:58 -07:00
Erik Eckstein
716d0d7c17 Add a build option to compiler StdlibUnittest with -sil-serialize-all
This is the configurable version of 29214253e5
By default it's off.
2016-01-22 17:12:31 -08:00
Joe Pamer
5f29594cbf Revert "Reinstate "Compile StdlibUnittest with -sil-serialize-all."""
This reverts commit 29214253e5.

This change massively regresses test execution times for DebugAssert builds, where we won't currently benefit from this added validation.
Moving forward, we'll scope this exclusively to optimized builds.
2016-01-22 11:55:08 -08:00
Erik Eckstein
29214253e5 Reinstate "Compile StdlibUnittest with -sil-serialize-all.""
This reinstates commit 79517a8edf.

Let's try again. All blocking problems should be resolved now.
Compiling StdlibUnittest with -sil-serialize-all gives a much higher test coverage because we can inline and optimize unittest code togeter with the test file.
It already helped to uncover some compiler bugs which we wouldn't have found without this change.

On the downside, a test-run in optimized mode takes considerable longer than before, because some tests need much longer to compile.
2016-01-21 12:18:39 -08:00
Davide Italiano
0001c9e227 [CMake] Spell freebsd correctly.
Case sensitiveness matters in this case.
2016-01-08 02:00:25 +00:00
Davide Italiano
f1b3965586 [stdlib] Port StdlibUnittest to FreeBSD. 2016-01-07 21:05:32 +00:00
ken0nek
fcd8fcee91 Convert [Cc]an not -> [Cc]annot 2015-12-23 00:55:48 +09:00
Erik Eckstein
5de8fbb705 Revert "Compile StdlibUnittest with -sil-serialize-all."
Some tests are failing in check-swift-all-optimize.
rdar://problem/18917405

This reverts commit 79517a8edf.
2015-12-11 08:05:21 -08:00
Erik Eckstein
79517a8edf Re-apply "Compile StdlibUnittest with -sil-serialize-all."
Should now be ok with the workaround in the AtomicInt.swift test
2015-12-04 12:58:38 -08:00
Erik Eckstein
e15132a6f7 Revert "Compile StdlibUnittest with -sil-serialize-all."
This reverts commit adc92bab45.

It caused a fail of stdlib/AtomicInt.swift on linux.
2015-11-30 16:53:08 -07:00
Erik Eckstein
adc92bab45 Compile StdlibUnittest with -sil-serialize-all. 2015-11-30 13:11:00 -08:00
Dmitri Hrybenko
153d95efc6 SwiftShims: don't redeclare libc functions
Clang importer thinks that SwiftShims is the primary module where they
live, and this confuses code completion.

rdar://22488333

Swift SVN r32218
2015-09-25 03:33:50 +00:00
Dmitri Hrybenko
67944589d6 stdlib: improve index invalidation guarantees for removeFirst()
Slice types that are RangeReplaceable (like ArraySlice) now slice
themselves in removeFirst().  Previously, these types were picking up
the wrong default implementation, and they were going through
replaceRange(), which caused all indices to be invalidated.  The new
implementation preserves all indices.

rdar://22536664

Swift SVN r31918
2015-09-12 04:35:51 +00:00
Dmitri Hrybenko
4cfe818c43 StdlibUnittest: extract collection tests into a reusable generic testsuite
Swift SVN r30124
2015-07-12 01:04:38 +00:00
Dave Abrahams
069ba3ecf6 [stdlibunittest] Gyb-away code duplication in logging wrappers
Swift SVN r30110
2015-07-11 04:02:11 +00:00
Dave Abrahams
4bc3815135 [stdlibunittest] Missed update to CMakeLists.txt
Swift SVN r29791
2015-06-29 20:47:10 +00:00
Dave Abrahams
dcd46ea6df [stdlib] A system for concise testing of customization points.
This approach should help us massively reduce the amount of code it
takes to verify that the architecture of our protocols works as
expected.  Pair-programmed with Dmitri Hrybenko.

Swift SVN r29752
2015-06-27 02:31:26 +00:00
Ben Langmuir
784a05faf2 [cmake] Replace a bunch of OSX checks with Darwin checks
These should all apply to any Darwin platform, and the current behaviour
was breaking cross-compilation.

Introduces a SWIFT_DARWIN_VARIANTS pattern, to be used as follows:
    if(SWIFT_HOST_VARIANT MATCHES "${SWIFT_DARWIN_VARIANTS}")

Also fix one place where I checked the CMAKE_SYSTEM_NAME instead of the
host variant that I recently introduced.  I haven't attempted to find
the rest of the places we're doing this though.

Swift SVN r26554
2015-03-25 21:15:30 +00:00
Dmitri Hrybenko
350248dae5 Reorganize the directory structure under 'stdlib'
The standard library has grown significantly, and we need a new
directory structure that clearly reflects the role of the APIs, and
allows future growth.

See stdlib/{public,internal,private}/README.txt for more information.

Swift SVN r25876
2015-03-09 05:26:05 +00:00