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

Normalize LLVM_ROOT when writing sanity file #22153

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

xanzarx
Copy link

@xanzarx xanzarx commented Jun 27, 2024

Visual Studio Code CMakeTools extension cleans cache when the editor opens in Windows. Possible root cause is different LLVM root paths string case in santiy.txt:

  • For startup it produces path starting with 'c:' e.g c:\projects\emscripten\upstream\bin
  • For regular cmake configuration or build it produces path starting with 'C:' e.g C:\projects\emscripten\upstream\bin
    This leads to rebuilding cache every time the editor is launched, which is a bit frustrating
    Link to similar issue

For windows path to folders is case independent anyways, so possible fix is just put lowercase string to sainty.txt for Windows.

@sbc100
Copy link
Collaborator

sbc100 commented Jun 27, 2024

I'd like to understand this issue a little more before landing this. How/where/why is VSCode settings the llvm root?

@sbc100
Copy link
Collaborator

sbc100 commented Jun 27, 2024

Is EM_CONFIG being set somewhere perhaps?

tools/shared.py Outdated Show resolved Hide resolved
@xanzarx
Copy link
Author

xanzarx commented Jun 27, 2024

As it turns out running commands with drive letter in different case in windows terminal application will lead change sanity.txt (and cache rebuild)

C:\Projects\test>C:\projects\emscripten\upstream\emscripten\em++ main.cpp
sanity.txt:

3.1.59|C:/Projects/emscripten/upstream/bin

C:\Projects\test>c:\projects\emscripten\upstream\emscripten\em++ main.cpp
sanity.txt:

3.1.59|c:/Projects/emscripten/upstream/bin

For not it seems the issue was not caused (at least directly) by interaction with VS Code or CMake tools plugin for VSCode

@sbc100
Copy link
Collaborator

sbc100 commented Jun 27, 2024

As it turns out running commands with drive letter in different case in windows terminal application will lead change sanity.txt (and cache rebuild)

C:\Projects\test>C:\projects\emscripten\upstream\emscripten\em++ main.cpp sanity.txt:

3.1.59|C:/Projects/emscripten/upstream/bin

C:\Projects\test>c:\projects\emscripten\upstream\emscripten\em++ main.cpp sanity.txt:

3.1.59|c:/Projects/emscripten/upstream/bin

For not it seems the issue was not caused (at least directly) by interaction with VS Code or CMake tools plugin for VSCode

Interesting! Thanks for the repro case. I wonder if we can make that into a test case? Maybe not worth it..

@sbc100 sbc100 changed the title changed LLVM root path to lower case in sanity.txt output for Windows Normalize LLVM path when writing sanity file Jun 27, 2024
@sbc100 sbc100 changed the title Normalize LLVM path when writing sanity file Normalize LLVM_ROOT when writing sanity file Jun 27, 2024
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.

None yet

2 participants