Open swift-ci opened 2 years ago
jayayres (JIRA User) I can't seem to reproduce this with 13.2 (not command-line-tools).
Have you tried it with a full Xcode or with an OSS Toolchain (https://www.swift.org/download/)?
Here's a way to reproduce it:
Get a 16" MacBook Pro M1 Max.
Install macOS 12.1 (21C52).
Install Xcode 13.2.1.xip.
Use xcode-select
to select Xcode 13.2.1.
git clone https://github.com/apple/swift-protobuf.git
cd swift-protobuf
xcrun swift build -c release --product protoc-gen-swift --arch arm64 --arch x86_64
echo $?
For me, the exit status ($?
) is 1, indicating failure. Note, though, that the last line of output is
100%: Build succeeded
and indeed ./.build/apple/Products/Release/protoc-gen-swift
is an apparently complete, working executable.
In my testing, I have to build for both architectures simultaneously to produce the failure. Building for just one architecture at a time does not induce failure.
Comment by Jay Ayres (JIRA)
I can't reproduce this from within Xcode itself. I am confirming as well, for the PackageBug.zip example, that this fails from the command line with error code 1 when I do:
swift build -c release --arch arm64 --arch x86_64
but single-architecture builds do not fail.
Attachment: Download
Environment
xcodebuild Xcode 13.2, Build version 13C90 Monterey 12.1 M1 Max MBPAdditional Detail from JIRA
| | | |------------------|-----------------| |Votes | 1 | |Component/s | Package Manager | |Labels | Bug | |Assignee | None | |Priority | Medium | md5: e549b419adb482736a0b860db11495c1Issue Description:
Using Xcode 13.2 command line tools, swift build -c release --arch arm64 --arch x86_64 is resulting in the error:
"error: remark: Incremental compilation has been disabled: it is not compatible with whole module optimization"
being fatal, while in Xcode 13.1 and earlier it was non-fatal.
Steps to reproduce:
Install Xcode 13.2 CLI tools. Unzip attached PackageBug.zip.
cd PackageBug ; ./build.sh
Unzip attached PackageBug.zip.
Adding in --verbose, one can see that both -incremental and -whole-module-optimization are passed in as flags to swiftc. On Xcode 13.1, the line "remark: Incremental compilation has been disabled: it is not compatible with whole module optimization" is present, but it is not fatal; it only becomes fatal on Xcode 13.2, but it seems like the issue is that both -incremental and -whole-module-optimization are passed in from SwiftPM.