Windows builds for macro targets in release mode break the compiler
broken-bytes opened this issue · 11 comments
Description
Issue
When building any macro target on Windows in release mode, the Swift Compiler gets hung.
The last output with -vv
set is always -o F:\Projects\MacroTest\.build\x86_64-unknown-windows-msvc\release\SwiftSyntax.build\SyntaxTypeNodes.swift.o
.
Test setup
- Any recent Swift version, tested on 5.9.2-release and 5.11 development.
- Default macro package(In fact any macro package)
- Recent swift-syntax dependency, tested with 509.0.0 and 509.1.1
Steps to Reproduce
- swift package init --type=macro
- swift build -c release -vv
- Compiler gets hung
Tracked in Apple’s issue tracker as rdar://122442648
Is this something that was already known? I can't seem to see the issue via the link
Is this something that was already known? I can't seem to see the issue via the link
You're not supposed to - that's Apples internal bug tracking system, so presumably they filed (or had) an internal issue covering the same problem.
I have not - might be interesting to get this under a debugger.
@compnerd If I can assist in any way feel free to instruct me. If you need additional logs or anything.
What is really interesting is that we definitely would be building this file in release mode all the time - swift-syntax is part of the toolchain build and so we have this continuously building on Swift CI, GHA for The Browser Company's builds of the toolchain, and multiple developers building locally.
Does building a macro package work in release mode for you locally? From what you said it sounds like?
Could the difference be that you are building using CMake, @compnerd while @broken-bytes is building using SwiftPM?
@ahoppen possible - that is a difference between the builds, though feels surprising.
Not too surprising to be honest. I had a couple of issues with SPM whereas the same code with CMake worked. Cxx interop, for example.