Skip to content

build.ps1 migration #68242

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

Closed
wants to merge 1 commit into from
Closed

build.ps1 migration #68242

wants to merge 1 commit into from

Conversation

compnerd
Copy link
Member

No description provided.

@etcwilde
Copy link
Member

etcwilde commented Sep 1, 2023

@swift-ci please test Windows

Copy link
Member

@etcwilde etcwilde left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm assuming the build.ps1 script is almost entirely being copied from https://github.com/compnerd/swift-build/blob/main/build.ps1. I don't have a windows box on me so I can't test it at the moment, but if it is a copy, that script been working for me, so it should be okay.

I think disabling the test should be moved to a separate PR. If someone tries running the tests with VS2022 on main, do they see the test failure there too, or is it specific to rebranch? If it affects VS2022 on main, it should probably go to main.

@@ -1,6 +1,7 @@
// RUN: %target-run-simple-swift(-I %S/Inputs -Xfrontend -enable-experimental-cxx-interop -Xcc -std=c++17)
//
// REQUIRES: executable_test
// REQUIRES: SR68068
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems like it should/could be in a separate PR.

utils/build.ps1 Outdated
#
# This source file is part of the Swift.org open source project
#
# Copyright (c) 2014 - 2020 Apple Inc. and the Swift project authors
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2014 - 2023 ;)

@etcwilde
Copy link
Member

etcwilde commented Sep 1, 2023

Windows failed, but the bot reported success ???:

FAILED: lib/Support/CMakeFiles/LLVMSupport.dir/CrashRecoveryContext.cpp.obj 
C:\PROGRA~2\MICROS~1\2019\COMMUN~1\VC\Tools\MSVC\1429~1.300\bin\Hostx64\x64\cl.exe  /nologo /TP -DGTEST_HAS_RTTI=0 -DUNICODE -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS -D_HAS_EXCEPTIONS=0 -D_SCL_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_WARNINGS -D_UNICODE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Ilib\Support -IC:\Users\swift-ci\jenkins\workspace\swift-PR-windows\llvm-project\llvm\lib\Support -Iinclude -IC:\Users\swift-ci\jenkins\workspace\swift-PR-windows\llvm-project\llvm\include /DWIN32 /D_WINDOWS   /Zc:inline /Zc:preprocessor /Zc:__cplusplus /Oi /bigobj /permissive- /W4 -wd4141 -wd4146 -wd4244 -wd4267 -wd4291 -wd4351 -wd4456 -wd4457 -wd4458 -wd4459 -wd4503 -wd4624 -wd4722 -wd4100 -wd4127 -wd4512 -wd4505 -wd4610 -wd4510 -wd4702 -wd4245 -wd4706 -wd4310 -wd4701 -wd4703 -wd4389 -wd4611 -wd4805 -wd4204 -wd4577 -wd4091 -wd4592 -wd4319 -wd4709 -wd5105 -wd4324 -w14062 -we4238 /Gw /O2 /Ob2 /DNDEBUG -MD -std:c++17  /EHs-c- /GR- /showIncludes /Folib\Support\CMakeFiles\LLVMSupport.dir\CrashRecoveryContext.cpp.obj /Fdlib\Support\CMakeFiles\LLVMSupport.dir\LLVMSupport.pdb /FS -c C:\Users\swift-ci\jenkins\workspace\swift-PR-windows\llvm-project\llvm\lib\Support\CrashRecoveryContext.cpp
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um\oaidl.h(487): warning C5103: pasting '/' and '/' does not result in a valid preprocessing token
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\shared\wtypes.h(745): note: in expansion of macro '_VARIANT_BOOL'
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um\oaidl.h(487): error C2059: syntax error: '/'
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um\oaidl.h(487): error C2238: unexpected token(s) preceding ';'
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um\oaidl.h(502): warning C5103: pasting '/' and '/' does not result in a valid preprocessing token
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\shared\wtypes.h(745): note: in expansion of macro '_VARIANT_BOOL'
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um\oaidl.h(502): error C2059: syntax error: '/'
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um\oaidl.h(502): error C2238: unexpected token(s) preceding ';'
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um\propidlbase.h(319): warning C5103: pasting '/' and '/' does not result in a valid preprocessing token
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\shared\wtypes.h(745): note: in expansion of macro '_VARIANT_BOOL'
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um\propidlbase.h(319): error C2059: syntax error: '/'
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um\propidlbase.h(319): error C2238: unexpected token(s) preceding ';'
[36/257][ 14%][3.196s] Building CXX object lib\Support\CMakeFiles\LLVMSupport.dir\CachePruning.cpp.obj
[37/257][ 14%][3.198s] Building CXX object lib\Support\CMakeFiles\LLVMSupport.dir\Hashing.cpp.obj
[38/257][ 14%][3.221s] Building CXX object lib\Support\CMakeFiles\LLVMSupport.dir\DJB.cpp.obj
[39/257][ 15%][3.309s] Building CXX object lib\Support\CMakeFiles\LLVMSupport.dir\AMDGPUMetadata.cpp.obj
[40/257][ 15%][3.336s] Building CXX object lib\Support\CMakeFiles\LLVMSupport.dir\Caching.cpp.obj
[41/257][ 15%][3.384s] Building CXX object lib\Support\CMakeFiles\LLVMSupport.dir\CSKYAttributeParser.cpp.obj
[42/257][ 16%][3.405s] Building CXX object lib\Support\CMakeFiles\LLVMSupport.dir\FormattedStream.cpp.obj
[43/257][ 16%][3.416s] Building CXX object lib\Support\CMakeFiles\LLVMSupport.dir\Debug.cpp.obj
[44/257][ 17%][3.480s] Building CXX object lib\Support\CMakeFiles\LLVMSupport.dir\DataExtractor.cpp.obj
[45/257][ 17%][3.483s] Building CXX object lib\Support\CMakeFiles\LLVMSupport.dir\ARMAttributeParser.cpp.obj
[46/257][ 17%][3.558s] Building CXX object lib\Demangle\CMakeFiles\LLVMDemangle.dir\ItaniumDemangle.cpp.obj
[47/257][ 18%][3.578s] Building CXX object lib\Support\CMakeFiles\LLVMSupport.dir\FloatingPointMode.cpp.obj
[48/257][ 18%][3.609s] Building CXX object lib\Support\CMakeFiles\LLVMSupport.dir\FoldingSet.cpp.obj
[49/257][ 19%][3.786s] Building CXX object lib\Support\CMakeFiles\LLVMSupport.dir\CodeGenCoverage.cpp.obj
[50/257][ 19%][3.850s] Building CXX object lib\Support\CMakeFiles\LLVMSupport.dir\InstructionCost.cpp.obj
[51/257][ 19%][3.885s] Building CXX object lib\Support\CMakeFiles\LLVMSupport.dir\DebugCounter.cpp.obj
[52/257][ 20%][3.908s] Building CXX object lib\Support\CMakeFiles\LLVMSupport.dir\FormatVariadic.cpp.obj
[53/257][ 20%][3.997s] Building CXX object lib\Support\CMakeFiles\LLVMSupport.dir\Error.cpp.obj
[54/257][ 21%][4.010s] Building CXX object lib\Support\CMakeFiles\LLVMSupport.dir\ErrorHandling.cpp.obj
[55/257][ 21%][4.065s] Building CXX object lib\Support\CMakeFiles\LLVMSupport.dir\GlobPattern.cpp.obj
[56/257][ 21%][4.079s] Building CXX object lib\Support\CMakeFiles\LLVMSupport.dir\APFloat.cpp.obj
[57/257][ 22%][4.271s] Building CXX object lib\Support\CMakeFiles\LLVMSupport.dir\FileOutputBuffer.cpp.obj
[58/257][ 22%][4.341s] Building CXX object lib\Support\CMakeFiles\LLVMSupport.dir\DAGDeltaAlgorithm.cpp.obj
[59/257][ 22%][4.344s] Building CXX object lib\Support\CMakeFiles\LLVMSupport.dir\BalancedPartitioning.cpp.obj
[60/257][ 23%][4.388s] Building CXX object lib\Support\CMakeFiles\LLVMSupport.dir\FileUtilities.cpp.obj
[61/257][ 23%][4.477s] Building CXX object lib\Support\CMakeFiles\LLVMSupport.dir\FileCollector.cpp.obj
[62/257][ 24%][4.599s] Building CXX object lib\Support\CMakeFiles\LLVMSupport.dir\GraphWriter.cpp.obj
[63/257][ 24%][4.662s] Building CXX object lib\Support\CMakeFiles\LLVMSupport.dir\CommandLine.cpp.obj
[64/257][ 24%][4.684s] Building CXX object lib\Support\CMakeFiles\LLVMSupport.dir\ELFAttributeParser.cpp.obj
ninja: build stopped: subcommand failed.
Error: cmake.exe exited with code 1.
Invocation:
  cmake.exe --build T:\0 --target llvm-tblgen
Call stack:
  at Invoke-Program, C:\Users\swift-ci\jenkins\workspace\swift-PR-windows\swift\utils\build.ps1: line 314
  at <ScriptBlock>, C:\Users\swift-ci\jenkins\workspace\swift-PR-windows\swift\utils\build.ps1: line 610
  at Isolate-EnvVars, C:\Users\swift-ci\jenkins\workspace\swift-PR-windows\swift\utils\build.ps1: line 333
  at Build-CMakeProject, C:\Users\swift-ci\jenkins\workspace\swift-PR-windows\swift\utils\build.ps1: line 471
  at Build-BuildTools, C:\Users\swift-ci\jenkins\workspace\swift-PR-windows\swift\utils\build.ps1: line 721
  at <ScriptBlock>, C:\Users\swift-ci\jenkins\workspace\swift-PR-windows\swift\utils\build.ps1: line 1529
At C:\Users\swift-ci\jenkins\workspace\swift-PR-windows\swift\utils\build.ps1:318 char:7
+       throw $ErrorMessage
+       ~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OperationStopped: (Error: cmake.ex...ps1: line 1529
:String) [], RuntimeException
    + FullyQualifiedErrorId : Error: cmake.exe exited with code 1.
Invocation:
  cmake.exe --build T:\0 --target llvm-tblgen
Call stack:
  at Invoke-Program, C:\Users\swift-ci\jenkins\workspace\swift-PR-windows\swift\utils\build.ps1: line 314
  at <ScriptBlock>, C:\Users\swift-ci\jenkins\workspace\swift-PR-windows\swift\utils\build.ps1: line 610
  at Isolate-EnvVars, C:\Users\swift-ci\jenkins\workspace\swift-PR-windows\swift\utils\build.ps1: line 333
  at Build-CMakeProject, C:\Users\swift-ci\jenkins\workspace\swift-PR-windows\swift\utils\build.ps1: line 471
  at Build-BuildTools, C:\Users\swift-ci\jenkins\workspace\swift-PR-windows\swift\utils\build.ps1: line 721
  at <ScriptBlock>, C:\Users\swift-ci\jenkins\workspace\swift-PR-windows\swift\utils\build.ps1: line 1529

@etcwilde
Copy link
Member

etcwilde commented Sep 1, 2023

@swift-ci please test Windows

1 similar comment
@compnerd
Copy link
Member Author

compnerd commented Sep 6, 2023

@swift-ci please test Windows

@compnerd
Copy link
Member Author

compnerd commented Sep 7, 2023

@swift-ci please test Windows platform

@compnerd
Copy link
Member Author

compnerd commented Sep 7, 2023

@swift-ci please build toolchain Windows platform

2 similar comments
@compnerd
Copy link
Member Author

@swift-ci please build toolchain Windows platform

@bnbarham
Copy link
Contributor

@swift-ci please build toolchain Windows platform

@etcwilde
Copy link
Member

Jinx!

@etcwilde
Copy link
Member

@swift-ci please build toolchain Windows platform

1 similar comment
@compnerd
Copy link
Member Author

@swift-ci please build toolchain Windows platform

@etcwilde
Copy link
Member

Windows failure:

"C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -E touch T:/1/tools/swift/tools/swift-plugin-server/swift-plugin-server.swiftmodule""
error: unknown argument: '-delayload:shell32.dll'

@etcwilde
Copy link
Member

@swift-ci please build toolchain Windows platform

@compnerd
Copy link
Member Author

@swift-ci please build toolchain Windows platform

@etcwilde
Copy link
Member

Windows failure:

CMake Error at C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.24/Modules/CMakeTestSwiftCompiler.cmake:44 (message):
  The Swift compiler

    "T:/1/bin/swiftc.exe"

  is not able to compile a simple test program.

  It fails with the following output:

    Change Dir: T:/102/CMakeFiles/CMakeTmp
    
    Run Build Command(s):C:/PROGRA~1/MICROS~2/2022/COMMUN~1/Common7/IDE/COMMON~1/MICROS~1/CMake/Ninja/ninja.exe cmTC_22da1 && [1/1][100%][0.023s] Linking Swift executable cmTC_22da1.exe
    FAILED: cmTC_22da1.exe CMakeFiles/cmTC_22da1.dir/main.swift.obj cmTC_22da1.swiftmodule 
    cmd.exe /C "cd . && T:\1\bin\swiftc.exe -target x86_64-unknown-windows-msvc -output-file-map CMakeFiles\cmTC_22da1.dir\\output-file-map.json -incremental -j 36 -emit-executable -o cmTC_22da1.exe -emit-dependencies  -resource-dir T:/101/lib/swift -L T:/101/lib/swift/windows -vfsoverlay T:/101/stdlib/windows-vfs-overlay.yaml -gnone -Xlinker /INCREMENTAL:NO -Xlinker /OPT:REF -Xlinker /OPT:ICF  -resource-dir T:/101/lib/swift -L T:/101/lib/swift/windows -vfsoverlay T:/101/stdlib/windows-vfs-overlay.yaml -gnone -Xlinker /INCREMENTAL:NO -Xlinker /OPT:REF -Xlinker /OPT:ICF  T:\102\CMakeFiles\CMakeTmp\main.swift    && cd ."
    ninja: build stopped: subcommand failed.
    
    

  

  CMake will not be able to correctly generate this project.

while configuring swift-corelibs-libdispatch.

@etcwilde
Copy link
Member

@swift-ci please build toolchain Windows platform

@compnerd
Copy link
Member Author

@swift-ci please build toolchain Windows platform

@compnerd
Copy link
Member Author

Please test with following PRs:
swiftlang/llvm-project#7496

@swift-ci please build toolchain Windows platform

@shahmishal shahmishal deleted the branch swiftlang:rebranch October 23, 2023 16:29
@shahmishal shahmishal closed this Oct 23, 2023
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.

5 participants