Skip to content

[Bug] On Windows this action leaves the wrong link.exe first in the PATH. #313

@dabrahams

Description

@dabrahams

As noted here. Setting up Swift 5.10 appears to finish on Windows, but it leaves Path set such that when swiftc is used to link, it finds /usr/bin/link.exe (from MINGW I think) rather than the link.exe that comes from the MS tools (workflow run):

Run cmake --build Swifty-LLVM/.cmake-build
  cmake --build Swifty-LLVM/.cmake-build
  shell: C:\Program Files\PowerShell\7\pwsh.EXE -command ". '{0}'"
  env:
    swift-version: 5.10
    url_prefix: https://github.com/hylo-lang/llvm-build/releases/download/[2](https://github.com/hylo-lang/Swifty-LLVM/actions/runs/8840879423/job/24276998977#step:10:2)0240303-215025
    llvm_package_basename: llvm-17.0.6-x86_64-unknown-windows-msvc17-Debug
    SDKROOT: C:\Users\runneradmin\AppData\Local\Programs\Swift\Platforms\5.10.0\Windows.platform\Developer\SDKs\Windows.sdk\
[0/2] Re-checking globbed directories...
[1/55] Linking Swift static library lib\ArgumentParserToolInfo.lib
FAILED: lib/ArgumentParserToolInfo.lib _deps/swiftargumentparser-build/Sources/ArgumentParserToolInfo/CMakeFiles/ArgumentParserToolInfo.dir/ToolInfo.swift.obj swift/ArgumentParserToolInfo.swiftmodule 
C:\Windows\system[3](https://github.com/hylo-lang/Swifty-LLVM/actions/runs/8840879423/job/24276998977#step:10:3)2\cmd.exe /C "cd . && C:\Users\runneradmin\AppData\Local\Programs\Swift\Toolchains\5.10.0+Asserts\usr\bin\swiftc.exe -j [4](https://github.com/hylo-lang/Swifty-LLVM/actions/runs/8840879423/job/24276998977#step:10:4) -num-threads 4 -emit-library -static -o lib\ArgumentParserToolInfo.lib -module-name ArgumentParserToolInfo -module-link-name ArgumentParserToolInfo -emit-module -emit-module-path swift\ArgumentParserToolInfo.swiftmodule -emit-dependencies  -Onone -g -incremental -libc MDd -output-file-map _deps\swiftargumentparser-build\Sources\ArgumentParserToolInfo\CMakeFiles\ArgumentParserToolInfo.dir\Debug\output-file-map.json  D:\a\Swifty-LLVM\Swifty-LLVM\Swifty-LLVM\.cmake-build\_deps\swiftargumentparser-src\Sources\ArgumentParserToolInfo\ToolInfo.swift    && cd ."
error: link command failed with exit code 1 (use -v to see invocation)

/usr/bin/link: extra operand '/OUT:lib\\ArgumentParserToolInfo.lib'

Try '/usr/bin/link --help' for more information.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions