Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
- Loading branch information
Showing
233 changed files
with
120 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
if(SWIFT_BUILD_STDLIB) | ||
add_subdirectory(SwiftExperimental) | ||
endif() | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
The modules in the 'stdlib/internal' directory provide APIs that are | ||
under active development and intended to be merged into the appropriate | ||
libraries under 'stdlib/public' in the near future, after API review is | ||
complete and when all other tools that accompany these new APIs are ready. | ||
|
||
|
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
if(SWIFT_BUILD_STDLIB) | ||
add_subdirectory(SwiftPrivate) | ||
endif() | ||
|
||
if(CMAKE_SYSTEM_NAME STREQUAL "Darwin") | ||
if(SWIFT_BUILD_SDK_OVERLAY) | ||
# FIXME: there is nothing Darwin-specific in StdlibUnittest, but to use | ||
# POSIX APIs it imports the Darwin module on Apple platforms, so it can't | ||
# be built separately from the SDK overlay. | ||
add_subdirectory(StdlibUnittest) | ||
add_subdirectory(SwiftPrivateDarwinExtras) | ||
add_subdirectory(SwiftPrivatePthreadExtras) | ||
endif() | ||
endif() | ||
|
||
if(CMAKE_SYSTEM_NAME STREQUAL "Linux") | ||
add_subdirectory(Glibc) | ||
add_subdirectory(StdlibUnittest) | ||
add_subdirectory(SwiftPrivateDarwinExtras) | ||
add_subdirectory(SwiftPrivatePthreadExtras) | ||
endif() |
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
The modules in the 'stdlib/private' directory contain APIs that are | ||
considered private to the Swift project. Don't use them outside of the | ||
repositories related to the Swift project. | ||
|
||
These APIs are used for building Swift build and test automation tools, | ||
represent early prototypes of APIs that are not intended to be included | ||
in the standard library soon, modules to support ports to other platforms, | ||
and other similar needs that are private to the Swift project and its | ||
development process. | ||
|
||
|
2 changes: 1 addition & 1 deletion
2
stdlib/unittest/CMakeLists.txt → stdlib/private/StdlibUnittest/CMakeLists.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
10 changes: 5 additions & 5 deletions
10
stdlib/unstable/CMakeLists.txt → stdlib/private/SwiftPrivate/CMakeLists.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,20 @@ | ||
set(swift_unstable_private_link_libraries) | ||
set(swift_private_private_link_libraries) | ||
if(SWIFT_HOST_VARIANT STREQUAL "linux") | ||
# Needed for arc4random | ||
find_package(BSD REQUIRED) | ||
list(APPEND swift_unstable_private_link_libraries | ||
list(APPEND swift_private_private_link_libraries | ||
${BSD_LIBRARIES}) | ||
endif() | ||
|
||
add_swift_library(swiftSwiftUnstable SHARED IS_STDLIB | ||
add_swift_library(swiftSwiftPrivate SHARED IS_STDLIB | ||
# This file should be listed the first. Module name is inferred from the | ||
# filename. | ||
SwiftUnstable.swift | ||
SwiftPrivate.swift | ||
IO.swift | ||
PRNG.swift | ||
ShardedAtomicCounter.swift | ||
|
||
SWIFT_COMPILE_FLAGS -Xfrontend -sil-serialize-all | ||
PRIVATE_LINK_LIBRARIES ${swift_unstable_private_link_libraries} | ||
PRIVATE_LINK_LIBRARIES ${swift_private_private_link_libraries} | ||
INSTALL_IN_COMPONENT stdlib-experimental) | ||
|
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
set(swift_private_darwin_extras_module_depends | ||
SwiftPrivate) | ||
|
||
if(SWIFT_HOST_VARIANT STREQUAL "macosx") | ||
list(APPEND swift_private_darwin_extras_module_depends | ||
Darwin) | ||
elseif(SWIFT_HOST_VARIANT STREQUAL "linux") | ||
list(APPEND swift_private_darwin_extras_module_depends | ||
Glibc) | ||
endif() | ||
|
||
add_swift_library(swiftSwiftPrivateDarwinExtras SHARED IS_STDLIB | ||
# This file should be listed the first. Module name is inferred from the | ||
# filename. | ||
SwiftPrivateDarwinExtras.swift | ||
Subprocess.swift | ||
|
||
SWIFT_MODULE_DEPENDS ${swift_private_darwin_extras_module_depends} | ||
SWIFT_COMPILE_FLAGS -Xfrontend -sil-serialize-all | ||
INSTALL_IN_COMPONENT stdlib-experimental) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 6 additions & 6 deletions
12
stdlib/pthread_extras/CMakeLists.txt → .../SwiftPrivatePthreadExtras/CMakeLists.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,21 @@ | ||
set(swift_unstable_pthread_extras_module_depends) | ||
set(swift_private_pthread_extras_module_depends) | ||
|
||
if(SWIFT_HOST_VARIANT STREQUAL "macosx") | ||
list(APPEND swift_unstable_pthread_extras_module_depends | ||
list(APPEND swift_private_pthread_extras_module_depends | ||
Darwin) | ||
elseif(SWIFT_HOST_VARIANT STREQUAL "linux") | ||
list(APPEND swift_unstable_pthread_extras_module_depends | ||
list(APPEND swift_private_pthread_extras_module_depends | ||
Glibc) | ||
endif() | ||
|
||
add_swift_library(swiftSwiftUnstablePthreadExtras SHARED IS_STDLIB | ||
add_swift_library(swiftSwiftPrivatePthreadExtras SHARED IS_STDLIB | ||
# This file should be listed the first. Module name is inferred from the | ||
# filename. | ||
SwiftUnstablePthreadExtras.swift | ||
SwiftPrivatePthreadExtras.swift | ||
PthreadBarriers.swift | ||
SwiftBlockToCFunctionThunks.cpp | ||
|
||
SWIFT_MODULE_DEPENDS ${swift_unstable_pthread_extras_module_depends} | ||
SWIFT_MODULE_DEPENDS ${swift_private_pthread_extras_module_depends} | ||
SWIFT_COMPILE_FLAGS -Xfrontend -sil-serialize-all | ||
INSTALL_IN_COMPONENT stdlib-experimental) | ||
|
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
...d_extras/SwiftUnstablePthreadExtras.swift → ...eadExtras/SwiftPrivatePthreadExtras.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
if(SWIFT_BUILD_STDLIB) | ||
add_subdirectory(SwiftShims) | ||
add_subdirectory(core) | ||
add_subdirectory(runtime) | ||
endif() | ||
|
||
if(CMAKE_SYSTEM_NAME STREQUAL "Darwin") | ||
if(SWIFT_BUILD_SDK_OVERLAY) | ||
add_subdirectory(SDK) | ||
endif() | ||
endif() | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
The modules in the 'stdlib/public' directory are shipped publicly | ||
as a part of Apple Swift. | ||
|
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#include "../../../lib/Basic/Demangle.cpp" | ||
#include "../../../lib/Basic/Punycode.cpp" |
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
|
||
import StdlibUnittest | ||
import Swift | ||
import SwiftUnstable | ||
import SwiftPrivate | ||
|
||
//===--- | ||
// Utilities. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.