Commit Graph

280 Commits

Author SHA1 Message Date
swift-ci
2deb2f9a87 Merge remote-tracking branch 'origin/main' into rebranch 2025-09-19 22:17:53 -07:00
Kavon Farvardin
889baf7f2c Merge pull request #84411 from kavon/copyprop-onone
sil: provide ability to run CopyPropagation in -Onone
2025-09-19 22:09:59 -07:00
Kavon Farvardin
4a943d464d sil: provide ability to run CopyPropagation in -Onone
This does not enable it by default. Use either of the flags:

```
-enable-copy-propagation
-enable-copy-propagation=always
```

to enable it in -Onone. The previous frontend flag
`-enable-copy-propagation=true` has been renamed to
`-enable-copy-propagation=optimizing`, which is currently default.

rdar://107610971
2025-09-19 16:23:19 -07:00
swift-ci
3a31109821 Merge remote-tracking branch 'origin/main' into rebranch 2025-09-19 10:35:08 -07:00
Anthony Latsis
ea5d89d0d0 tools: Set Swift bug report message in some executable targets
If these programs crash, we want them to print the Swift bug report
message, not the default LLVM one, which leads to
https://github.com/llvm/llvm-project/issues.

While here, hoist the setting of the bug report message to the
START_PROGRAM macro so that we don't forget to set it in the future.
2025-09-19 12:05:31 +01:00
swift-ci
94f8b0d0e3 Merge remote-tracking branch 'origin/main' into rebranch 2025-08-25 17:03:36 -07:00
Michael Gottesman
bfecaa357f [frontend] Expose via a LangOption whether or not the compiler is compiling for a triple that supports AArch64 TBI.
Just breaking down layers of a larger patch to make it easier to review.
2025-08-21 12:52:49 -07:00
Anthony Latsis
3f841b515c Merge remote-tracking branch 'origin/main' into jepa-rebranch 2025-07-30 14:31:33 +01:00
Allan Shortlidge
e8ced33b81 swift-symbolgraph-extract: Infer target triple.
Infer the `-target` argument to `swift-synthesize-interface` to be the host
triple when unspecified instead of emitting an error.
2025-07-28 12:43:37 -07:00
Allan Shortlidge
3ffb218e9a swift-synthesize-interface: Infer target triple.
Infer the `-target` argument to `swift-synthesize-interface` to be the host
triple when unspecified instead of emitting an error.

Resolves rdar://156353450.
2025-07-28 12:42:57 -07:00
Anthony Latsis
b66a1aa8c5 DriverTool,IRGen: Address llvm::Target::createTargetMachine overload deprecation
See https://github.com/llvm/llvm-project/pull/130940.
2025-07-21 12:47:48 +01:00
swift-ci
f7bc202e92 Merge remote-tracking branch 'origin/main' into rebranch 2025-07-10 21:35:02 -07:00
Allan Shortlidge
c6dad96492 Make LayoutPrespecialization a baseline feature instead of experimental.
Since LayoutPrespecialization has been enabled by default in all compiler
invocations for quite some time, it doesn't make sense for it to be treated as
experimental feature. Make it a baseline feature and remove all the
checks for it from the compiler.
2025-07-10 11:25:28 -07:00
swift-ci
4668d6c04c Merge remote-tracking branch 'origin/main' into rebranch 2025-06-26 13:55:39 -07:00
Xi Ge
5c530ea4e4 ABI checker: drop usage of AllowDeserializingImplementationOnly
AllowDeserializingImplementationOnly was historically added as a defensive
check against deserailzation issues introduced by @implementationOnly imports.
It's no longer specified by other tools, thus the ABI checker should drop
it as well.

rdar://153683760
2025-06-25 12:15:21 -07:00
swift-ci
9a08a18af2 Merge remote-tracking branch 'origin/main' into rebranch 2025-06-20 15:45:44 -07:00
Anthony Latsis
1ceeb7089b Merge pull request #82338 from AnthonyLatsis/jepa
ASTBridging: Bridge more enums directly
2025-06-20 23:13:50 +01:00
swift-ci
1512b9775d Merge remote-tracking branch 'origin/main' into rebranch 2025-06-20 14:26:27 -07:00
Ian Anderson
cb954b98f9 [ABIChecker] Use -Isystem and -Fsystem for swift-api-digester
Use the Swift -Fsystem flag for swift-api-digester instead of the clang -iframework flag. Add support for -Isystem for parity.

rdar://152747420
2025-06-18 21:21:45 -07:00
Anthony Latsis
3e9923f0c0 ASTBridging: Bridge swift::AccessorKind directly 2025-06-19 04:26:52 +01:00
swift-ci
c99747e0c1 Merge remote-tracking branch 'origin/main' into rebranch 2025-06-02 23:38:09 -07:00
Artem Chikin
5b501ad2c5 Hard-code the 'Darwin' module as having been built without C++ interop
Textual interfaces for 'Darwin' built with recent compilers specify that it is built witout C++ interop enabled. However, to ensure compatibility with versions of the 'Darwin' module built with older compilers, we hard-code this fact. This is required to break the module cycle that occurs when building the 'Darwin' module with C++ interop enabled, where the underlying 'Darwin' clang module depends on C++ standard library for which the compiler brings in the 'CxxStdlib' Swift overlay, which depends on 'Darwin'.
2025-06-02 14:16:57 -07:00
swift-ci
1015e6583d Merge remote-tracking branch 'origin/main' into rebranch 2025-05-01 16:53:29 -07:00
Steven Wu
226552bf23 [Caching] Improve diagnostics around swift caching
Improve diagnostics message for swift caching build by trying to emit
the diagnostics early when there is more context to differentiate the
different kind of problems.

After the improvement, CAS Error should be more closer to when there is
functional problem with the CAS, rather than mixing in other kinds of
problem (like scanning dependency failures) when operating with a CAS.

rdar://145676736
2025-05-01 10:36:42 -07:00
swift-ci
fb8945fd36 Merge remote-tracking branch 'origin/main' into rebranch 2025-04-25 05:53:34 -07:00
Anthony
c9b17383c8 Grammatical corrections for compound modifiers 2025-04-24 09:21:32 +02:00
Anthony Latsis
f0236c262f DriverTool, IRGen: Adjust uses of llvm::Module::setTargetTriple (parameter type changed)
Per 979c275097a642e9b96c6b0a12f013c831af3a6e (llvm-project).
2025-04-24 01:52:48 +01:00
Anthony Latsis
da47b58586 Refactor llvm::opt::GenericOptTable subclasses after changes to LLVM Option library
Per dd647e3e608ed0b2bac7c588d5859b80ef4a5976 (llvm-project).
2025-04-24 01:52:46 +01:00
QuietMisdreavus
f7bf701ed9 parse symbol availability allow/block-list args together (#80968) 2025-04-22 11:46:32 -06:00
QuietMisdreavus
41120da702 [SymbolGraphGen] add flags to filter platforms out of availability metadata (#80778)
* add option to filter availability metadata in symbol graphs

* filter out platform-specific availability in the stdlib docs

rdar://144379124
2025-04-14 15:20:22 -07:00
Nate Chandler
056fbc44c9 [CoroutineAccessors] Control ABI via flag. 2025-04-10 07:41:37 -07:00
Michael Gottesman
3ff9463957 Make Feature a struct enum so we can put methods on it.
Just noticed this as I was looking at making other changes.
2025-04-05 10:08:29 +01:00
Kuba Mracek
859c5654bf Add a sil-opt test for cond_fail merging through -mergeable-traps 2025-03-24 09:04:49 -07:00
Andrew Trick
fa64a362a2 Add -Xfrontend -enable-address-dependencies
Temporary option to bootstrap '@'_addressable enforcement.

Once all the SILGen cases are handled, we won't need this option.
2025-03-03 16:21:48 -08:00
Erik Eckstein
f0ebfb1f1f sil-opt: Fix the -disable-sil-ownership-verifier command line option
I messed this up when I worked on the sil-opt command line options.
2025-02-28 11:14:44 +01:00
Meghana Gupta
681a6c814a Merge pull request #78939 from meg-gupta/ossamoduleson
Enable serialization in OSSA
2025-01-30 23:25:19 -08:00
Meghana Gupta
6f9167c29e Serialize after high level passes for -emit-sib 2025-01-30 17:10:04 -08:00
Anthony Latsis
a84dfc8387 [Gardening] Fix some set but not used variables 2025-01-30 21:34:38 +00:00
Alastair Houghton
100f2615cb [Tests] Enable C++ interop for Runtime in the overlay verification test.
The Runtime module requires C++ interop enabled, because that's
the only way to robustly fix things so that it is able to declare various
types and constants without clashing with system headers.

To make this work, we also need to add a missing invocation to sil-opt to
make it pick the correct C++ runtime library.

rdar://143050566
2025-01-28 14:21:50 +00:00
Alastair Houghton
760cc57bef [Backtracing] Rename _Backtracing to Runtime.
Move the backtracing code into a new Runtime module.  This means renaming
the Swift Runtime's CMake target because otherwise there will be a name
clash.

rdar://124913332
2025-01-17 10:09:36 +00:00
Ian Anderson
87d6979dae Merge pull request #78303 from ian-twilightcoder/clang-importer-search-paths
[ClangImporter] clang's -iframework comes before builtin usr/local/include, but Swift's -Fsystem comes after
2025-01-06 13:05:25 -08:00
Xi Ge
0f98e5803a Frontend: add an ABI checker flag to avoid downgrading detected ABI breakages into warnings. rdar://122325279 2025-01-02 16:41:03 -08:00
Ian Anderson
cdb42c3535 [ClangImporter] clang's -iframework comes before builtin usr/local/include, but Swift's -Fsystem comes after
When Swift passes search paths to clang, it does so directly into the HeaderSearch. That means that those paths get ordered inconsistently compared to the equivalent clang flag, and causes inconsistencies when building clang modules with clang and with Swift. Instead of touching the HeaderSearch directly, pass Swift search paths as driver flags, just do them after the -Xcc ones.

Swift doesn't have a way to pass a search path to clang as -isystem, only as -I which usually isn't the right flag. Add an -Isystem Swift flag so that those paths can be passed to clang as -isystem.

rdar://93951328
2024-12-23 22:15:52 -08:00
Hamish Knight
23e3f5f5de Merge pull request #77666 from hamishknight/lets-try-this-again
[AST] Remove `ModuleDecl::addFile`
2024-11-21 20:15:58 +00:00
Arnold Schwaighofer
c5463bdf92 Merge pull request #68985 from antoniofrighetto/feature/load-pass-plugin
[Driver][Frontend] Introduce `load-pass-plugin` option
2024-11-20 14:22:12 -08:00
Hamish Knight
4946c799af [AST] Remove ModuleDecl::addFile
Rather than exposing an `addFile` member on
ModuleDecl, have the `create` members take a
lambda that populates the files for the module.
Once module construction has finished, the files
are immutable.
2024-11-17 14:17:20 +00:00
Finagolfin
22833fbc54 [android] Update to LTS NDK 27c
Add a new bits/ header to the Android overlay, include runtime libraries that are
auto-extracted and listed many times to the list of libraries to be de-duplicated,
enable a C++ interop test that's working again, and update the doc with new
libraries that need to be available to run a simple executable.
2024-11-14 00:11:53 +05:30
Tony Allevato
2ceb02ce59 Merge pull request #77574 from allevato/synth-api-options
[Frontend] Add some printing/vistation options to `swift-synthesize-interface`.
2024-11-13 11:54:58 -05:00
Tony Allevato
0d7bc4d0f5 [Frontend] Add some printing/vistation options to swift-synthesize-interface.
The `-include-submodules` flag causes the synthesized interface to include
implicit Clang submodules of the module being printed. Since these are
automatically made visible when importing the corresponding top-level module,
it's often useful to have them present in the same synthesized Swift
interface instead of having to make separate invocations to get each
submodule separately.

The `-print-fully-qualified-types` causes type names to be printed with
full module qualification. This is useful when using the synthesized
interface for some other kind of analysis, because it ensures that all
type references explicitly indicate which module they came from, instead
of having to guess scoping and import resolution rules to figure out
which module a reference comes from.
2024-11-12 20:17:35 -05:00
Steven Wu
be70402a16 Merge pull request #77347 from cachemeifyoucan/eng/PR-cache-print-key
[CAS] Add an utility action to swift-cache-tool to print cache key
2024-11-11 14:42:17 -08:00