Commit Graph

24 Commits

Author SHA1 Message Date
Fabrice de Gans
4596a04f6a modulemap: Add missing dependency on vcruntime
`stdlib.h` includes `limits.h`, which is defined in the `vcruntime`
module.
2025-06-09 15:20:58 -07:00
Fabrice de Gans
e94cc8626c Platform: Windows SDK 26100.3916 module map update
A minor update to the Windows SDK broke our module maps. This fixes the
issue by re-separating a few modules. For backward-compatibility and
proper export of symbols, the split headers are also included in the
main `ucrt` module.
2025-06-03 11:59:34 -07:00
Fabrice de Gans
72dad03924 Simplify ucrt.modulemap 2025-06-02 15:24:43 -07:00
Fabrice de Gans
6f9876a565 Platform: Update module maps for the static SDK
Building with the Windows static SDK uncovered issues in the Windows
module maps. Some of the headers were missing and others had incorrect
layering. This updates the module maps to build with the static Windows
SDK.
2025-06-02 15:24:17 -07:00
Fabrice de Gans
d5ea19405d Put float and stddef back inside the ucrt module
These were split out in #79751. However, this split is not needed for
these. Furthermore, modulemaps have bugs when it comes to re-exporting
some modules, resulting in missing exports.
2025-03-21 10:01:01 -07:00
Fabrice de Gans
7a965cee00 Restore legacy_stdio_definitions in ucrt.modulemap
This was removed in #79751 but is required in some cases.
2025-03-19 16:51:38 -07:00
Fabrice de Gans
5e3bd9f90b Merge pull request #79751 from Steelskin/fabrice/update-ucrt-modulemap
Update ucrt.modulemap for Windows SDK 10.0.26100
2025-03-18 09:04:24 -07:00
Alex Lorenz
b62eafd866 [windows] split out complex module from ucrt module, to allow new swift-foundation to import ucrt when C++ interoperability is enabled
Fixes https://github.com/swiftlang/swift/issues/75691
2024-08-06 11:33:03 -07:00
Saleem Abdulrasool
81cab33a75 Platform: further modularise ucrt
Add a couple of submodules for these modules to further modularise the
headers.  This might expose additional APIs now as some of these headers
would not have been indirectly included and wind up in the wrong module.
2023-08-06 21:16:40 -07:00
Saleem Abdulrasool
d4c5f2a845 Platform: add an additional corecrt submodule
This was detected as missing when trying to re-modularise MSVCPRT.
2023-07-26 15:50:15 -07:00
Saleem Abdulrasool
19a0eaaa77 Windows: add conio and corecrt.conio
This adds `conio` and `corecrt.conio` modules to the ucrt modulemap to expose these interfaces to Swift.

Fixes: #63024
2023-01-30 11:43:06 -08:00
Saleem Abdulrasool
1779c569c8 Platform: add a definition for std on Windows
This adds the c++ module for Windows to help further the C++ interop.
2022-06-28 16:10:37 -07:00
Saleem Abdulrasool
01ae682b4a Platform: extend ucrt with some MSVC extensions
Add some additional modules which become necessary to support the C++
modularization.
2022-06-27 13:44:18 -07:00
Saleem Abdulrasool
c7ee0a85a8 Platform: extract corecrt module
This extracts the `corecrt` module in order to setup the necessary
structure for enabling the `std` module for C++.
2022-06-27 08:58:05 -07:00
Saleem Abdulrasool
7cee2bf487 Windows: include direct.h in sys.stat module
On Unicies `sys/stat.h` will provide `mkdir`.  Windows provides the
POSIX requirement through the portable name `_mkdir` which is declared
in the `direct.h` header.  This adds the additional header to the `ucrt`
module to allow access to this function.
2020-08-10 16:25:42 -07:00
Saleem Abdulrasool
c826deadb4 stdlib: link against legacy_stdio_definitions on Windows
Because Microsoft inlines the definitions of the printf family of
functions, we end up with undefined references to them.  Add an explicit
request to link against the `legacy_stdio_definitions` library when
`ucrt.C.stdio` is used which provides out-of-line definitions for them.
This fixes the building of the `stdlib/VarArgs' test.
2019-03-01 14:50:46 -08:00
Saleem Abdulrasool
04a5d84575 Platform: make MSVCRT more Unix-libc like
Since `stdin`, `stdout`, and `stderr` are defined via macros, we cannot see them
on the swift side.  Replicate these by hand.  Expose `STDIN_FILENO`,
`STDOUT_FILENO`, and `STDERR_FILENO` for compatibility with other libc
implementations.  This reduces the need for changing the codebase unnecessarily
for MSVCRT.
2018-12-13 16:01:42 -08:00
Saleem Abdulrasool
29dc89bd9b stdlib: broaden ucrt module
Add `process` to the ucrt module as this is used in the Foundation port
for Windows.
2018-11-24 20:57:46 -08:00
Saleem Abdulrasool
a990013847 Platform: MSVCRT provides POSIX.fcntl
Add the missing module declaration for the POSIX interfaces.  This is
needed to access the permission mode macros.
2018-06-05 13:20:44 -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
practicalswift
6d1ae2a39c [gardening] 2016 → 2017 2017-01-06 16:41:22 +01: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
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
Saleem Abdulrasool
a05fd17b64 Platform: port to msvcrt, add msvcrt module
This adds the swiftMSVCRT module which is similar in spirit to swiftGlibc and
swiftDarwin, exposing the Microsoft C Runtime library to swift.  Furthermore,
disable pieces of the standard library which are not immediately trivially
portable to Windows.  A lot of this functionality can still be implemented and
exposed to the user, however, this is the quickest means to a PoC for native
windows support.

As a temporary solution, add a -DCYGWIN flag to indicate that we are building
for the cygwin windows target.  This allows us to continue supporting the cygwin
environment whilst making the windows port work natively against the windows
environment (msvc).  Eventually, that will hopefully be replaced with an
environment check in swift.
2016-07-12 17:31:06 -07:00