Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Capture macro expansions in an output group named
macro_expansions
…
…during debug builds LLDB wants these files to be present on the file system to step into macro expansions, because their file paths are recorded in debug info. The compiler uses `TMPDIR` (if set) as the location for those files, so we can have the worker set `TMPDIR` to a target-specific location before spawning `swiftc`. If this location is workspace-relative, then those file paths are also remapped via `-debug-prefix-map`—an added bonus. The `macro_expansions` group will contain a tree (directory) artifact that contains a `swift-generated-sources` subdirectory (the compiler forces that name), which contains one or more `.swift` files representing the expanded macro buffers. PiperOrigin-RevId: 549932429 (cherry picked from commit 69349ee) Cherry-pick notes: We already included most of this in c9d1f5f. This just restricts `_macro_expansion_configurator` to debug builds. Signed-off-by: Brentley Jones <github@brentleyjones.com>
- Loading branch information