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
Also introduce two new frontend flags:
The -solver-scope-threshold flag sets the maximum number of scopes, which was
previously hardcoded to 1 million.
The -solver-trail-threshold flag sets the maximum number of trail steps,
which defaults to 64 million.
This change ensures that when loading some module dependency 'Bar' which has a package-only dependency on 'Foo', only the following clients attempt to resolve/load 'Foo':
- Source compilation with package-name equal to that of 'Bar'.
- Textual interface compilation of a *'package'* interface with package-name equal to that of 'Bar'.
Ensuring that the following kinds of clients do not attempt to resolve/load 'Foo':
- Source compilation with package-name different to that of 'Bar'
- Textual interface compilation of a public or private interface, regardless of package name.
This fixes the behavior where previously compilation of a Swift textual interface dependency 'X' from its public or private interface, with an interface-specified package-name, from a client without a matching package-name, resulted in a lookup of package-only dependencies of modules loaded into 'X'. This behavior is invalid if we are not building from the package textual interface, becuase the module dependency graph is defined by the package name of the source client, not individual module dependency package name. i.e. In-package module dependencies are resolved/loaded only if the parent source compile matches the package name.
Resolves rdar://139979180
To allow feature build settings to be composed more flexibly, allow an
`-enable-upcoming-feature` flag to be overridden by a
`-disable-upcoming-feature` flag. Whichever comes last on the command line
takes effect. Provide the same functionality for `-enable-experimental-feature`
as well.
Resolves rdar://126283879.
It is unsound to expose `package` declarations in textual interfaces without a
package identity for them to belong to so we should not offer this flag.
Resolves rdar://139361524.
C++ swift::Parser is going to be replaced with SwiftParser+ASTGen.
Direct dependencies to it should be removed. Before that, remove
unnecessary '#include "swift/Parse/Parser.h"' to clarify what actually
depends on 'swift::Parser'.
Split 'swift::parseDeclName()' et al. into the dedicated files.
If an upcoming feature was enabled by passing it via `-enable-experimental-feature`,
downgrade the `already enabled` diagnostic to a warning.
Resolves rdar://139087679.
This achieves the same as clang's `-fdebug-info-for-profiling`, which
emits DWARF discriminators to aid in narrowing-down which basic block
corresponds to a particular instruction address. This is particularly
useful for sampling-based profiling.
rdar://135443278
Add flag `-load-resolved-plugin` to load macro plugin, which provides a
pre-resolved entry into PluginLoader so the plugins can be loaded based
on module name without searching the file system. The option is mainly
intended to be used by explicitly module build and the flag is supplied
by dependency scanner.
Add a setting to IRGenOptions and key off of it to emit yield_once_2
coroutines using either (1) the same code-path as yield_once coroutines
or (2) a new, not-yet implemented code-path.
Add flags to set the value in both directions. During bringup, by
default, use the existing caller-allocated ABI.
Its functionality has been superseded by `@_spiOnly import`. There are no
longer any known clients and the flag was already unsupported in Swift 6, so
the functionality is now removed (but the flag is only deprecated for Swift 5).
Resolves rdar://136867210.
Use IncludeTreeFileList instead of full feature CASFS for swift
dependency filesystem. This allows smaller CAS based VFS that is smaller
and faster. This is enabled by the CAS enabled compilation does not
need to iterate file system.
rdar://136787368
When the frontend option `-abi-comments-in-module-interface` is provided
during interface printing, the printed interface will contain
additional comments that provide the mangled names for public symbols.
This is an experiment in seeing how much information we can
meaningfully extract from a printed Swift interface for the purpose of
bridging with other languages.