Skip to content
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

Track Windows 7 vs. delete-on-close fixes #82677

Open
cuviper opened this issue Mar 1, 2021 · 2 comments
Open

Track Windows 7 vs. delete-on-close fixes #82677

cuviper opened this issue Mar 1, 2021 · 2 comments
Labels
A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. C-bug Category: This is a bug. O-windows Operating system: Windows O-windows-7 OS: Windows 7 or Windows Server 2008 R2 or etc. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@cuviper
Copy link
Member

cuviper commented Mar 1, 2021

Rust #82605 reverted LLVM D81803, "Avoid setting the delete-on-close bit if a TempFile doesn't reside on a local drive," because that regressed Windows 7 in #81051.

That change was meant to fix LLVM PR42623, which also references Rust #54216. It would be nice if some Windows user could verify if that was fixed on a nightly where we still had the change, roughly 2021-01-13 through 2021-02-28. But since it left Windows 7 unable to create any archives, we decided that regression was worse than the fix.

LLVM 48378 also reported a Windows 7 regression that seems to be the same root cause. Perhaps there will be a new update that makes it all work for Windows 7, so we can have the best of both. Another possibility suggested in a compiler meeting was to use runtime platform detection, skipping D81803's code on Windows 7, but letting us still have the bug fix on newer Windows.

Alternatively, when Rust eventually decides to stop supporting Windows 7, we can just drop the revert / reapply D81803.

@cuviper cuviper added O-windows Operating system: Windows T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. C-bug Category: This is a bug. labels Mar 1, 2021
@cuviper cuviper added the A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. label Mar 1, 2021
@cuviper
Copy link
Member Author

cuviper commented Mar 24, 2021

Can some Windows 7 users try the fix mentioned on LLVM 48378? I suppose you could build LLVM's main branch directly, and try some llvm-ar commands as mentioned in #81051 (comment).

@moxian
Copy link
Contributor

moxian commented Mar 26, 2021

Can confirm that llvm-ar works as of llvm/llvm-project@8f62a80

> cmake --build .
<snip>
> ls > hello.txt
> .\Debug\bin\llvm-ar.exe r hello.a hello.txt
D:\work\trash\github\llvm\build\Debug\bin\llvm-ar.exe: warning: creating hello.a
> ls hello*


    Directory: D:\work\trash\github\llvm\build


Mode                LastWriteTime         Length Name
----                -------------         ------ ----
-a----       2021-03-26     11:50          14468 hello.a
-a----       2021-03-26     11:49          14400 hello.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. C-bug Category: This is a bug. O-windows Operating system: Windows O-windows-7 OS: Windows 7 or Windows Server 2008 R2 or etc. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

3 participants