Commit Graph

8541 Commits

Author SHA1 Message Date
Hamish Knight
d260bd8ddb [build-script] Remove Xcode generation support
This was quite brittle and has now been superseded
by swift-xcodegen. Remove the CMake/build-script
logic for it, leaving the option behind to inform
users to switch to using xcodegen instead.
2025-02-12 12:19:21 +00:00
Jeff
57f6af6d45 util: Validate validatable params in build.ps1. (#79276)
* util: Validate validatable params in build.ps1.

* PR Feedback.

* Remove ValidateSet() for string[] values; it breaks when routed through build.cmd.
2025-02-10 22:58:52 -08:00
Saleem Abdulrasool
62f128f6de Merge pull request #79271 from jeffdav/build-ps1-whitespace-excision
util: Excise trailing whitespace in build.ps1.
2025-02-10 14:34:28 -08:00
Jeff
ff702de529 util: Excise trailing whitespace in build.ps1. 2025-02-10 09:54:18 -08:00
Saleem Abdulrasool
dce3462232 Merge pull request #79224 from compnerd/static-foundation
util: build static foundation for distribution on Windows
2025-02-10 09:32:23 -08:00
Bassam (Sam) Khouri
73c875d571 Merge pull request #79074 from bkhouri/t/main/support-swifttesting-in-swiftpm-for-toolchain-build
swiftpm: Test only running host platform architecture
2025-02-10 08:16:02 -05:00
Saleem Abdulrasool
f53d006bb9 util: build static foundation for distribution on Windows
This builds the static version of foundation in the experimental SDKs
for Windows. This is required to make further progress towards building
the early swift-driver with static linking to enable the early swift
driver based bootstrapping on Windows.
2025-02-07 13:08:03 -08:00
Owen Voorhees
3787044e83 Merge pull request #79108 from owenv/owenv/add-libclang-to-toolchain
Add libclang to install_components_with_clang presets

Swift Build uses libclang to read serialized diagnostic files, and invoke the module dependency scanner. Add it to the toolchain build.
2025-02-07 11:41:33 -08:00
Sam Khouri
1f3e232de7 swiftpm: Test only running host platform architecture
When adding a Swift Testing test to Swift PM repository, the `test`
portion of t he OSX package pipeline was building against x86_64 and
arm64.

Ensure Swift PM testing only runs against the host platform
architecture.
2025-02-07 10:35:29 -05:00
Hiroshi Yamauchi
0c7c79d80f Merge pull request #79167 from hjyamauchi/wix
Update the Wix version 4.0.6
2025-02-06 13:46:41 -08:00
Saleem Abdulrasool
9c85fbc8da AST,DependencyScan,IRGen,Serialization,Tooling: track library style (#78777)
Track if the dependency is static or dynamic. This is in preparation for
helping rename the static library to differentiate it from import
libraries.
2025-02-06 13:22:56 -08:00
Eric Miotto
8daf94c195 Merge pull request #79174 from edymtt/edymtt/match-verbosity-of-new-stdlib-and-compiler
build-script-impl: propagate `--verbose-build` to nested CMake builds
2025-02-06 07:09:09 -08:00
Eric Miotto
8f9829dce8 build-script-impl: propagate --verbose-build to nested CMake builds
The main goal of this change is to ensure that the new build of the
stdlib matches the same level of verbosity of the compiler build that
spawn it.

For now I'm not matching this behaviour to the regular CMake build
products (which would be needed if want to target external projects
configured in LLVM).

Addresses rdar://144256800
2025-02-05 14:58:46 -08:00
Hiroshi Yamauchi
8698ab2250 Update the Wix version 4.0.6 2025-02-05 11:44:16 -08:00
Stefan Gränitz
fdec23c2a8 [lldb] New test flake to be skipped on Windows (#79154) 2025-02-05 10:28:29 -08:00
Stefan Gränitz
86d78c9eb6 Reland "utils: remove option to control the allocator" (#79151)
This reverts commit 310a75b9ea.
2025-02-05 17:35:34 +01:00
Alex Hoppen
a88be2b385 Merge pull request #78910 from ahoppen/adjustments-for-indexstoredb-restructure
[Windows] Adjustments to build.ps1 for restructuring of indexstore-db
2025-02-04 18:36:32 -08:00
Saleem Abdulrasool
4a459bead0 utils: add a build of the experimental runtime
This sets up the Windows build for the new runtime build as a means to
ensure that we do not regress the build. In order to reduce overall
build times and to start experimenting with the static support, it
builds this runtime with static libraries. The intent is to produce a
complete static SDK for distribution.
2025-02-04 10:31:35 -08:00
Stefan Gränitz
cc16488842 [windows][toolchain] Dump test output on failure when testing libdispatch (#79079)
Dumps output for test cases that failed or timed out
2025-02-04 09:27:01 -08:00
Stefan Gränitz
310a75b9ea Revert "utils: remove option to control the allocator" (#79112) 2025-02-04 16:53:12 +01:00
Saleem Abdulrasool
6f92302bf0 Merge pull request #79050 from andrurogerz/swift-inspect-android-on-windows
build swift-inspect for Android as part of toolchain build
2025-02-03 23:12:52 -08:00
Mishal Shah
360e2ab92b Merge pull request #79106 from cmcgee1024/add_swift_build_update_checkout
Add swift-build to update-checkout
2025-02-03 21:27:02 -08:00
3405691582
610c351184 Enable PACBTI on OpenBSD/arm64. (#78394)
BTI enforcement is mandatory, which means if PAC and BTI instructions
are not emitted, then the compiled binary gets killed with SIGILL. The
platform default compiler achieves enabling PAC and BTI by embedding the
relevant enabled Clang compilation option flags into the local platform
toolchain, which affects C/C++ code generation.

For Swift however, to achieve the same effect, we would need to add the
relevant LLVM module flags in the IRGen process. But, since Swift uses
the Clang code generator when doing this, using the same option flag
approach will work here as well, and is probably preferable to
introducing operating system-dependent logic to the ClangImporter, for
example.

Finally, the stdlib needs to be built with PACBTI as well, since the
stdlib's global constructors get run when a compiled binary does. Since
the Swift build uses the just-built Clang for the stdlib, just embed the
necessary options into `CMAKE_C_FLAGS` and `CMAKE_CXX_FLAGS` via
`build-script-impl`. This will be redundant with the host compiler, but
at least it will be thorough.
2025-02-04 07:33:08 +05:30
Chris McGee
127493580a Add swift-build to the rebranch and next schemes 2025-02-03 07:03:14 -05:00
Owen Voorhees
e0689cf8f1 Add libclang to install_components_with_clang presets 2025-02-02 21:29:57 -08:00
Chris McGee
d9c6befc72 Add swift-build to update-checkout 2025-02-02 08:09:20 -05:00
Cyndy Ishida
3232df4d67 Reapply '[BuildSystem] Stop building for i386-watch-simulator (#77692)' (#79018)
* Reapply '[BuildSystem] Stop building for i386-watch-simulator (#77692)'

    * [BuildSystem] Stop building for i386-watch-simulator

    In Xcode16 it is not supported.

This initially broke client projects who were still building the legacy
architecture but now that's resolved.
2025-01-31 15:04:28 -08:00
Saleem Abdulrasool
f695875aa1 Merge pull request #79058 from compnerd/dynamism
utils: rename `Foundation` to `DynamicFoundation`
2025-01-31 10:09:26 -08:00
Saleem Abdulrasool
7c9f47e22a Merge pull request #78998 from compnerd/your-allocator
utils: remove option to control the allocator
2025-01-31 08:49:55 -08:00
Saleem Abdulrasool
f38541f89b utils: rename Foundation to DynamicFoundation
The smoke test for the new runtime builds also serves as a static
runtime build test. Rename the `Foundation` product to
`DynamicFoundation` to permit the introduction of a `StaticFoundation`
to fit into the static SDK build.
2025-01-30 11:57:49 -08:00
Andrew Rogers
63d29ff878 only build for host and Android targets 2025-01-30 09:14:37 -08:00
Saleem Abdulrasool
0721124bbb Merge pull request #79029 from compnerd/build-cleanups
utils: minor build.ps1 tweaks
2025-01-30 09:02:17 -08:00
Andrew Rogers
fd1d5b0996 build swift-inspect for Android as part of toolchain build 2025-01-30 08:33:33 -08:00
Artem Chikin
9eeb78b8a4 Merge pull request #77719 from artemcm/RemoveBatchDependencyScan
[Dependency Scanning] Deprecate/Remove batch scanning capability
2025-01-30 08:30:06 -08:00
finagolfin
1aded39ea5 [build-script] Disable building and installing the Foundation macros for standalone SDKs (#78782)
Also, remove CMake flag for Android that is now directly set in that repo.
2025-01-30 14:01:58 +05:30
Saleem Abdulrasool
9b23eaa666 utils: remove option to control the allocator
The evolution proposal for enabling the memory allocator for the
toolchain on Windows has been accepted. Always use mimalloc for the
Windows toolchain and reduce the complexity.

Clean up and simplify some of the logic for the MSBuild based build of
mimalloc. Avoid building in the source tree at a cost of complexity.
Reduce the amount of building by selectively building projects instead
of the solution.
2025-01-29 22:27:11 -08:00
Hiroshi Yamauchi
c831aa5153 Merge pull request #78994 from hjyamauchi/mimallocarm64
Adjust to mimalloc v3.0.1 and enable mimalloc arm64
2025-01-29 17:05:28 -08:00
Andrew Rogers
43d8183f5c [build.ps1] remove Android API level from Dispatch.swiftmodule names (#78800)
* [android] remove Android API level from Dispatch.swiftmodule names

* [build.ps1] use swift -print-target-info to determine module triple

* PR feedback

* fix comment

* add swift pinned toolchain to path before invoking swift.exe

* run swift.exe from the built toolchain instead of the pinned toolchain

* include pinned toolchain runtime in path
2025-01-29 15:30:18 -08:00
Saleem Abdulrasool
3f4d0d2c0c utils: remove an unnecessary parenthetical
We can pass the raw dictionary directly, remove the unnecessary
punctuation.
2025-01-29 15:28:22 -08:00
Saleem Abdulrasool
ffdebddcf8 utils: merge adjacent build blocks
These were isolated by interleaving operations. However, recent tweaks
to the build have removed those. Merge the adjacent sections to show the
contiguous build segment.
2025-01-29 15:27:41 -08:00
Saleem Abdulrasool
e3a90d76f6 utils: remove a dead parameter in build.ps1 2025-01-29 15:27:41 -08:00
Stefan Gränitz
c1e0770b31 utils: include Fetch-Dependencies step in build.ps1 time tracking (#78976)
Build bot runtimes are very long and not fully transparent right now. In addition to the steps for build and test, we should keep an eye on Fetch-Dependencies.
2025-01-29 09:42:07 -08:00
Rintaro Ishizaki
59a1272821 [XcodeGen] Pattern match by KeyPath<T, Bool>
Simpler pattern match by `is` properties. E.g. `\.isNewline`
2025-01-28 22:14:35 -08:00
Rintaro Ishizaki
2d64ef2528 [XcodeGen] Make 'Byte' comform 'ExpressibleByUnicodeScalarLiteral'
Instead of comparing with 'UnicodeScalar', construct 'Byte' from
literals and compare with them. Make it less evil :)
2025-01-28 21:43:15 -08:00
Saleem Abdulrasool
07a3189966 Merge pull request #78953 from compnerd/test-all-the-things
utils: synchronise `-Test '*'` with build-windows-toolchain.bat
2025-01-28 16:29:06 -08:00
Rintaro Ishizaki
464d9d3ad5 Merge pull request #78879 from rintaro/xcodegen-commandline
[XcodeGen] Handle 'rule' declarations and generate command line args
2025-01-28 16:04:46 -08:00
Artem Chikin
41e471288a [Dependency Scanning] Deprecate/Remove batch scanning capability
Batch dependency scanning was added as a mechanism to support multiple compilation contexts within a single module dependency graph.
The Swift compiler and the Explicitly-built modules model has long since abandoned this approach and this code has long been stale. It is time to remove it and its associated C API.
2025-01-28 15:30:39 -08:00
Hiroshi Yamauchi
e838cecef1 Adjust to mimalloc v3.0.1 and enable mimalloc arm64 2025-01-28 15:13:44 -08:00
Stefan Gränitz
76243a25db [windows][toolchain] Build sanitizers and builtins standalone for all SDKs (#78861)
Unified builds of compiler-rt together with LLVM failed for the Android SDKs. It got too complicated to redirect the way LLVM would configure the nested build-trees. Standalone builds slightly increase build time, but they turned out much simpler and we end up with less duplication of definitions.
2025-01-28 22:08:07 +01:00
Saleem Abdulrasool
4a357fd2e8 utils: synchronise -Test '*' with build-windows-toolchain.bat
Extend the default full test set to include the same set that the rest
of the testing that is now enabled by default on swift.org CI.
2025-01-28 10:56:44 -08:00