Commit Graph

8541 Commits

Author SHA1 Message Date
Alastair Houghton
fc2d1b3b23 [Build] Fix swift_build_support tests.
This was broken by #77692.

rdar://140313372
2024-11-27 09:52:52 +00:00
Stefan Gränitz
4a93d76818 Rename option: IncludeSanitizers -> BuildSanitizers 2024-11-26 16:56:56 +01:00
Stefan Gränitz
76be949750 Align default targets for builtins and runtimes on x86_64 hosts 2024-11-26 16:56:56 +01:00
Saleem Abdulrasool
16fa7d599c utils: unlock building swift-inspect
When building for ARM64, we can now build swift-inspect as we use CMake
for the cross-compilation.
2024-11-22 09:19:52 -08:00
Hamish Knight
b0d91b016c Fix typo
Co-authored-by: Jamie <2119834+jamieQ@users.noreply.github.com>
2024-11-22 16:00:09 +00:00
Hamish Knight
ac4d52d5c3 [xcodegen] Update help text for --stdlib-swift
Clarify why a development snapshot is needed
for stdlib Swift targets.
2024-11-22 15:50:36 +00:00
Mishal Shah
9a48056f15 Bump the Swift version to 6.2 2024-11-22 01:04:37 -08:00
Saleem Abdulrasool
7d0c87b035 Merge pull request #77757 from compnerd/inspection-cmake
utils: use CMake to build swift-inspect for Windows
2024-11-21 15:45:18 -08:00
Yuta Saito
db33b2bd98 Merge pull request #77747 from kateinoigakukun/yt/enable-libcxx-filesystem 2024-11-21 23:59:13 +09:00
Stefan Gränitz
9b024399fc Add missing default for IncludeSanitizers option 2024-11-21 15:57:45 +01:00
Stefan Gränitz
1857d1c2af Initial patch for early feedback 2024-11-21 14:50:19 +01:00
Jake Petroules
5671688cce Update Yams tag to match SwiftDriver (#77713) 2024-11-21 00:46:37 -08:00
Saleem Abdulrasool
c72246cb15 utils: use CMake to build swift-inspect for Windows
This switches us to use CMake to build swift-inspect. In doing so, we
can now cross-compile this tool. Due to the use of CMake, we now have
install rules for the products, which allows the toolchain deployment
and simpler rules in the installer.
2024-11-20 21:21:39 -08:00
Saleem Abdulrasool
aa93694388 Merge pull request #77734 from compnerd/devtools-root
utils: remove `DEVTOOLS_ROOT` property for MSIs
2024-11-20 15:01:08 -08:00
Yuta Saito
afea9c53c2 wasm: Enable filesystem APIs in libcxx
As of a recent fix included in LLVM 17[1] and wasi-libc fix[2], we can
enable `LIBCXX_ENABLE_FILESYSTEM` in libcxx build for WebAssembly/WASI.
This allows us to use `<filesystem>`, `<fstream>`, etc in C++ code.

[1]: 66a562d22e
[2]: https://github.com/WebAssembly/wasi-libc/pull/463
2024-11-20 20:59:30 +00:00
Allan Shortlidge
a3075da13c Gardening: Remove out-of-date comments from availability-macros.def. 2024-11-20 10:08:45 -08:00
Saleem Abdulrasool
9d5db10c8b utils: remove DEVTOOLS_ROOT property for MSIs
This property was unused and has been removed from the WiX rules as of
swiftlang/swift-installer-scripts#347. Simplify the invocation.
2024-11-20 09:23:40 -08:00
Cyndy Ishida
1ab968d2b6 [BuildSystem] Stop building for i386-watch-simulator (#77692)
* [BuildSystem] Stop building for i386-watch-simulator

In Xcode16 it is not supported.
2024-11-20 08:57:19 -08:00
Meghana Gupta
1be434d954 Merge pull request #77637 from meg-gupta/lifetimeexperimental
Enable NonEscapable types by default and move lifetime dependence support under a new feature
2024-11-19 00:25:21 -08:00
Meghana Gupta
5b5acc64e0 Promote Nonescapable types to a language feature 2024-11-18 18:09:17 -08:00
Mishal Shah
067bb257e9 Update update-checkout-config.json to support release/6.1 and remove old configs 2024-11-18 17:25:12 -08:00
Saleem Abdulrasool
5319f1e30d utils: adjust Windows build to use shared LMDB
This adjusts the build to create a shared (static) build of LMDB.
Re-order the build rules, wire up the LMDB build into IndexStoreDB and
SourceKit-LSP.
2024-11-18 13:06:26 -08:00
Alex Hoppen
8bf9406146 Merge pull request #77656 from ahoppen/action-output
[Windows] Change log output to `Testing …` when testing a SwiftPM project in build.ps1
2024-11-15 18:20:41 -08:00
Alex Hoppen
91ca044d77 [Windows] Change log output to Testing … when testing a SwiftPM project in build.ps1 2024-11-15 14:28:38 -08:00
Finagolfin
85f38080b1 [build-script] Stop installing the llbuildSwift library that is no longer used 2024-11-15 19:59:17 +05:30
Erik Eckstein
3de0af9a13 split-cmdline: the -c option only has an argument for swiftpm, but not for the compiler 2024-11-15 12:18:05 +01:00
Saleem Abdulrasool
cc27c83fc8 build: adjust the early swift-driver handling
Windows has a strict limit on the file path, and use of extended names
for the build is not possible. Rather than hardcoding the location of
the early swift-driver build, allow the user to specify the path. If the
path is specified, we will attempt to copy `swift-driver` and
`swift-help` from that location. Adjust the code to account for the
build executable suffix. This should allow Windows to experiment with an
early swift-driver build.
2024-11-13 10:14:22 -08:00
Michael Gottesman
525713ae40 Merge pull request #77410 from gottesmm/pr-94aa0b2a8fff1e9552a8d5d424d294294869dc35
[swift_snapshot_tool] Add swift header to files that were missing it.
2024-11-11 21:09:43 -08:00
Michael Gottesman
ef23124f14 Merge pull request #77411 from gottesmm/pr-d60d3f6bf1fa250c270076ecf0e85a740c03e7ab
[swift_snapshot_tool] Add support for SWIFT_LIBRARY_PATH so scripts has access to the .dylib path so they can run tests.
2024-11-11 21:07:19 -08:00
Henrik G. Olsson
0678829cf7 Add @PointerBounds macro (#76969)
Add @PointerBounds macro

@PointerBounds is a macro intended to be applied by ClangImporter when
importing functions with pointer parameters from C headers. By
leveraging C attributes we can get insight into bounds, esapability, and
(eventually) lifetimes of pointers, allowing us to map them to safe(r)
and more ergonomic types than UnsafePointer.

This initial macro implementation supports CountedBy and Sizedby, but
not yet EndedBy. It can generate function overloads with and without an
explicit count parameter, as well as with UnsafeBufferPointer or Span
(if marked nonescaping), and any of their combinations. It supports
nullable/optional pointers, and both mutable and immutable pointers.
It supports arbitrary count expressions. These are passed to the macro
as a string literal since any parameters referred to in the count
expression will not have been declared yet when parsing the macro.

It does not support indirect pointers or inout parameters. It supports
functions with return values, but returned pointers can not be bounds
checked yet.

Bounds checked pointers must be of type Unsafe[Mutable]Pointer[?]<T>
or Unsafe[Mutable]RawPointer[?]. Count expressions must conform to
the BinaryInteger protocol, and have an initializer with signature
"init(exactly: Int) -> T?" (or be of type Int).

rdar://137628612

---------

Co-authored-by: Doug Gregor <dgregor@apple.com>
2024-11-11 14:54:25 -08:00
Saleem Abdulrasool
2d2ea65ccd Merge pull request #77493 from compnerd/naming
utils: correct function name for PS style
2024-11-11 11:24:31 -08:00
Hamish Knight
3793c37ad4 Merge pull request #77515 from hamishknight/buildable-folders
[xcodegen] Add buildable folder support
2024-11-10 00:18:51 +00:00
Hamish Knight
9a53db6b9a [xcodegen] Add --buildable-folders
This enables the use of folder references for
compatible targets, allowing new source files to
be added without needing to regenerate the project.
Currently disabled by default; I'd like to get
some living-on before enabling.
2024-11-09 20:16:45 +00:00
Hamish Knight
a596880b65 [xcodegen] Add --prefer-folder-refs flag 2024-11-09 20:01:37 +00:00
Hamish Knight
84ba92dbe8 [xcodegen] Add serialization support for buildable folders 2024-11-09 20:01:37 +00:00
Hamish Knight
29cfe90869 [xcodegen] Remove isImportant
This only existed to avoid adding anything under
a folder reference. Now that we add those
references first, this is no longer needed.
2024-11-09 20:01:37 +00:00
Hamish Knight
5ff60d014b [xcodegen] Add file references to project first
This requires ensuring we check that we're not
ever attempting to add a group under an existing
folder reference. This will be required for
buildable folders.
2024-11-09 20:01:37 +00:00
Saleem Abdulrasool
0d3aa3a009 utils: correct function name for PS style
The functions should be named [verb]-[noun], remove the extraneous `-`
in the name. Also homogenise the call to avoid the parenthesis.
2024-11-08 12:55:58 -08:00
Mishal Shah
54296a32b4 Bump the CMake version to v3.30.2 2024-11-07 14:02:52 -08:00
Hamish Knight
9e657eeb87 [xcodegen] Update README
Make it a bit clearer that `utils/generate-xcode` is
a convenience for the `swift-xcodegen` script in this
directory.
2024-11-06 20:33:25 +00:00
Hamish Knight
8e9df5c113 Merge pull request #77421 from hamishknight/update-readme
[xcodegen] Remove todo items from README
2024-11-06 19:21:26 +00:00
Hamish Knight
9368985434 [xcodegen] Remove todo items from README
These are now tracked with GitHub issues.
2024-11-06 15:10:37 +00:00
Hamish Knight
94b744ce4f [xcodegen] Fix typo 2024-11-06 12:20:44 +00:00
Hamish Knight
43be5456b1 [xcodegen] Allow output to be missing in compile_commands.json
This may not always be present for CI builds.
2024-11-06 12:20:44 +00:00
Hamish Knight
a9efa842a9 Merge pull request #77406 from hamishknight/a-new-generation
Introduce swift-xcodegen
2024-11-06 11:58:14 +00:00
John Hui
1626b0f0f6 Add several argument flags to split-cmdline (#77280)
* Add missing arg-flags to split-cmdline

* Add parameter arguments scraped from --help menus to split-cmdline

* Break apart line in comment to fix lint error
2024-11-05 16:58:21 -08:00
Michael Gottesman
cc9711e6a0 [swift_snapshot_tool] Add support for SWIFT_LIBRARY_PATH so scripts has access to the .dylib path so they can run tests. 2024-11-05 16:06:51 -08:00
Michael Gottesman
a3f54cdd5b [swift_snapshot_tool] Add swift header to files that were missing it. 2024-11-05 16:06:05 -08:00
Dave Lee
b8db9d481e [build-script][embedded] Conditionally force compiler-rt baremetal builtins (#77395)
This change allows build-script to be invoked with the following combination:

```
--llvm-targets-to-build=host --build-embedded-stdlib=false
```

When `--build-embedded-stdlib=false` is used, it's unnecessary to force-configure
additional compiler-rt targets. Further, when `--llvm-targets-to-build` is used,
the resulting llvm usually won't support the forced targets of armv6/armv7.
2024-11-05 15:30:32 -08:00
Hamish Knight
03d8ea5248 Introduce swift-xcodegen
This is a tool specifically designed to generate
Xcode projects for the Swift repo (as well as a
couple of adjacent repos such as LLVM and Clang).
It aims to provide a much more user-friendly experience
than the CMake Xcode generation (`build-script --xcode`).
2024-11-05 22:42:10 +00:00