Skip to content

Fix FoundationMacro build failure in ARM64 cross-build #80125

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 20, 2025

Conversation

hjyamauchi
Copy link
Contributor

To fix build failure https://ci-external.swift.org/job/swift-main-windows-toolchain-arm64/1074/consoleText

[2025-03-19 07:38:15] Building 'C:\Users\swift-ci\jenkins\workspace\swift-main-windows-toolchain-arm64\swift-foundation\Sources\FoundationMacros' to 'T:\x86_64-unknown-windows-msvc\FoundationMacros' ...
cmake.exe -B T:\x86_64-unknown-windows-msvc\FoundationMacros -S C:\Users\swift-ci\jenkins\workspace\swift-main-windows-toolchain-arm64\swift-foundation\Sources\FoundationMacros -G Ninja -D CMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX=T:/x64/toolchains/0.0.0+Asserts/usr -D CMAKE_Swift_COMPILER=T:/1/bin/swiftc.exe -D CMAKE_Swift_COMPILER_TARGET=x86_64-unknown-windows-msvc -D CMAKE_Swift_FLAGS=-sdk \"T:/Program Files/Swift/Platforms/Windows.platform/Developer/SDKs/Windows.sdk\" -gnone -Xlinker /INCREMENTAL:NO -Xlinker /OPT:REF -Xlinker /OPT:ICF -D CMAKE_Swift_FLAGS_RELEASE=-O -D CMAKE_Swift_FLAGS_RELWITHDEBINFO=-O -D SwiftSyntax_DIR=T:/5/cmake/modules
-- The Swift compiler identification is Apple 6.2
<unknown>:0: warning: using (deprecated) legacy driver, Swift installation does not contain swift-driver at: 'C:\Users\swift-ci\jenkins\workspace\swift-main-windows-toolchain-arm64\build\1\bin\swift-driver-new.exe'
-- Check for working Swift compiler: T:/1/bin/swiftc.exe
-- Check for working Swift compiler: T:/1/bin/swiftc.exe - works
-- SwiftSyntax_DIR provided, using swift-syntax from T:/5/cmake/modules
-- Configuring done (1.1s)
-- Generating done (0.0s)
-- Build files have been written to: T:/x86_64-unknown-windows-msvc/FoundationMacros
[1/3][ 33%][0.627s]Building Swift object FoundationMacros.swiftmodule CMakeFiles\FoundationMacros.dir\FoundationMacros.swift.obj CMakeFiles\FoundationMacros.dir\PredicateMacro.swift.obj
FAILED: FoundationMacros.swiftmodule CMakeFiles/FoundationMacros.dir/FoundationMacros.swift.obj CMakeFiles/FoundationMacros.dir/PredicateMacro.swift.obj 
T:\1\bin\swiftc.exe -target x86_64-unknown-windows-msvc -j 36 -num-threads 36 -c -DFOUNDATION_MACROS_LIBRARY -DFoundationMacros_EXPORTS -parse-as-library -emit-module -emit-module-path FoundationMacros.swiftmodule -module-name FoundationMacros -module-link-name FoundationMacros -sdk "T:/Program Files/Swift/Platforms/Windows.platform/Developer/SDKs/Windows.sdk" -gnone -Xlinker /INCREMENTAL:NO -Xlinker /OPT:REF -Xlinker /OPT:ICF -O -incremental -parse-as-library -Xfrontend -enable-experimental-feature -Xfrontend AccessLevelOnImport -Xfrontend -enable-experimental-feature -Xfrontend StrictConcurrency -Xfrontend -enable-upcoming-feature -Xfrontend InferSendableFromCaptures -output-file-map CMakeFiles\FoundationMacros.dir\Release\output-file-map.json -I T:\5\.\lib\swift\host C:\Users\swift-ci\jenkins\workspace\swift-main-windows-toolchain-arm64\swift-foundation\Sources\FoundationMacros\FoundationMacros.swift C:\Users\swift-ci\jenkins\workspace\swift-main-windows-toolchain-arm64\swift-foundation\Sources\FoundationMacros\PredicateMacro.swift
<unknown>:0: warning: using (deprecated) legacy driver, Swift installation does not contain swift-driver at: 'C:\Users\swift-ci\jenkins\workspace\swift-main-windows-toolchain-arm64\build\1\bin\swift-driver-new.exe'
<unknown>:0: warning: option '-incremental' is only supported in swift-driver
C:\Users\swift-ci\jenkins\workspace\swift-main-windows-toolchain-arm64\swift-foundation\Sources\FoundationMacros\PredicateMacro.swift:13:8: error: could not find module 'SwiftSyntax' for target 'x86_64-unknown-windows-msvc'; found: aarch64-unknown-windows-msvc, at: T:\5\.\lib\swift\host\SwiftSyntax.swiftmodule
  11 | //===----------------------------------------------------------------------===//
  12 | 
  13 | import SwiftSyntax
     |        `- error: could not find module 'SwiftSyntax' for target 'x86_64-unknown-windows-msvc'; found: aarch64-unknown-windows-msvc, at: T:\5\.\lib\swift\host\SwiftSyntax.swiftmodule
  14 | import SwiftSyntaxMacros
  15 | internal import SwiftDiagnostics
C:\Users\swift-ci\jenkins\workspace\swift-main-windows-toolchain-arm64\swift-foundation\Sources\FoundationMacros\PredicateMacro.swift:13:8: error: could not find module 'SwiftSyntax' for target 'x86_64-unknown-windows-msvc'; found: aarch64-unknown-windows-msvc, at: T:\5\.\lib\swift\host\SwiftSyntax.swiftmodule
  11 | //===----------------------------------------------------------------------===//

  12 | 

  13 | import SwiftSyntax

     |        `- error: could not find module 'SwiftSyntax' for target 'x86_64-unknown-windows-msvc'; found: aarch64-unknown-windows-msvc, at: T:\5\.\lib\swift\host\SwiftSyntax.swiftmodule

  14 | import SwiftSyntaxMacros

  15 | internal import SwiftDiagnostics

@hjyamauchi
Copy link
Contributor Author

@swift-ci please test

@hjyamauchi hjyamauchi marked this pull request as ready for review March 19, 2025 19:02
@compnerd compnerd enabled auto-merge March 20, 2025 00:25
@compnerd compnerd merged commit 1b1274f into swiftlang:main Mar 20, 2025
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants