Attribute @_silgen_name is today only allowed to be used on functions, this change allows usage on globals as well. The motivation for that is to be able to "forward declare" globals just like it's today possible to do with functions (for the cases where it's not practical or convenient to use a bridging header).
Separately, this change also adds a @_silgen_name(raw: ...) syntax, which simply avoids mangling the name (by using the \01 name prefix that LLVM uses). The motivation for that is to be able to reference the "magic Darwin linker symbols" that can be used to look up section bounds (in the current dylib/module) -- those symbols don't use the underscore prefix in their mangled names.
We recently changed the build-script to stop configuring LLDB
tests if `SKIP_TESTS_LLDB` is set (see rdar://109774179 and
https://github.com/apple/swift/pull/66171).
A common use-case is to build lldb without `-t` (to avoid running the
tests) and then run the tests separately later. However, if we don't
specify the `-t` flag to the build-script, `SKIP_TESTS_LLDB` is implicitly set.
Meaning this multi-step way of running lldb tests regressed.
This patch addresses this by creating a new `--lldb-configure-tests`
option which when set makes sure we set the CMake variable
`LLDB_INCLUDE_TESTS` (which will be the default behaviour).
The preset for which we originally introduced the `SKIP_TESTS_LLDB` check
now sets this new option to `0` to avoid configuring LLDB tests. The
preset skips running the tests anyway, we're not losing test coverage.
Section scans (for metadata, protocols, etc.) can be costly. This change adds tracing calls to those scans so we can more easily see how much time is spent in these scans and where they're initiated.
This adds an os_signpost implementation controlled by SWIFT_STDLIB_TRACING, and a default empty implementation for when that's disabled.
rdar://110266743
wasi-wasm32 support in build system was added in
b1236e92f9 but we forgot to add it to the
host for the case when we are building the standalone stdlib for the
target.
This corresponds to apple/swift-installer-scripts#207 which restructures
the MSIs and enables a number of new features. It switches us to:
- durable GUIDs which will enable upgrades
- enables dual-purpose MSIs
- switches the installer to per-user installs
- should drop the requirement on Administrator rights
- splits the MSIs into smaller chunks to provide a nicer installer
experience
- reduces the complexity in the management of the manifest
Expand macros in the specified source file syntactically (without any
module imports, nor typechecking).
Request would look like:
```
{
key.compilerargs: [...]
key.sourcefile: <file name>
key.sourcetext: <source text> (optional)
key.expansions: [<expansion specifier>...]
}
```
`key.compilerargs` are used for getting plugins search paths. If
`key.sourcetext` is not specified, it's loaded from the file system.
Each `<expansion sepecifier>` is
```
{
key.offset: <offset>
key.modulename: <plugin module name>
key.typename: <macro typename>
key.macro_roles: [<macro role UID>...]
}
```
Clients have to provide the module and type names because that's
semantic.
Response is a `CategorizedEdits` just like (semantic) "ExpandMacro"
refactoring. But without `key.buffer_name`. Nested expnasions are not
supported at this point.
Allow Linux builds on a host with Swift installed. This will allow us to
PR test enabling the early swift driver/syntax builds (once the Linux
docker images are updated).
CMake's bootstrapping script can't infer a number of parallel build jobs from the number of CPU cores on its own, which means that it's not parallelized by default. Let's get the value of CPU cores when `build_jobs` argument is not explicitly set.
`make -j` only has an effect on CMake's post-bootstrap build jobs, while a substantial amount of time was spent building code sequentially in CMake's bootstrap script without that `--parallelize` option, which is called on a line preceding the `make -j` invocation.
The preset for ubsan/asan buildbots include the
`buildbot_incremental_base` preset, which builds/runs
tests. But the tests now require libcxx to be built
since https://github.com/apple/swift/pull/66018
* Add @_used and @_section attributes for global variables and top-level functions
This adds:
- @_used attribute that flags as a global variable or a top-level function as
"do not dead-strip" via llvm.used, roughly the equivalent of
__attribute__((used)) in C/C++.
- @_section("...") attribute that places a global variable or a top-level
function into a section with that name, roughly the equivalent of
__attribute__((section("..."))) in C/C++.
Currently the `--skip-test-lldb` flag will only skip *running* the
tests. But we still pass `LLDB_INCLUDE_TESTS` to CMake when configuring
LLDB.
Since https://github.com/apple/swift/pull/66018 configuring LLDB tests will
now always require libcxx to be built. For some presets (e.g.,
`buildbot_osx_package`) we don't need to build libcxx and we explicitly
pass `--skip-test-lldb`; this means if we were to try configure LLDB
tests we would hard error.
The proposed solution is to check whether the user wants to skip LLDB
tests, and if so, set `LLDB_INCLUDE_TESTS=FALSE`.
rdar://109774179