Skip to content

Buildsystem: Convert path separators for Windows #106216

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
Jun 18, 2025

Conversation

shiena
Copy link
Contributor

@shiena shiena commented May 9, 2025

fixed #106215
Standardize path separators in env["CXX"] to / due to mixed \ and /.

@shiena shiena requested a review from a team as a code owner May 9, 2025 17:14
@AThousandShips AThousandShips changed the title fix: Convert path separators for Windows Buildsystem: Convert path separators for Windows May 9, 2025
@AThousandShips AThousandShips added this to the 4.5 milestone May 9, 2025
@shiena shiena force-pushed the fix/windows-path branch from eb30f64 to f49be9c Compare May 9, 2025 17:23
@akien-mga
Copy link
Member

Can you share what your env["CXX"] value is?

@shiena
Copy link
Contributor Author

shiena commented May 9, 2025

@akien-mga
Adding a print(repr(env["CXX"])) statement outputs the following path:

C:\\Users\\shien\\AppData\\Local\\Android\\Sdk/ndk/27.2.12479018/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++

@shiena shiena force-pushed the fix/windows-path branch 2 times, most recently from c709edf to 2c802a2 Compare June 16, 2025 19:27
@shiena
Copy link
Contributor Author

shiena commented Jun 16, 2025

Based on the comment in #106215, I identified that shlex.split in #97810 was the issue, so I fixed it.

@shiena shiena force-pushed the fix/windows-path branch from 2c802a2 to 2636c24 Compare June 16, 2025 20:56
@shiena shiena force-pushed the fix/windows-path branch from 2636c24 to 88181c8 Compare June 16, 2025 20:59
@shiena
Copy link
Contributor Author

shiena commented Jun 16, 2025

shlex.split is needed to handle spaces in paths. Instead of replacing path separators, disabled posix mode to handle this.

@shiena
Copy link
Contributor Author

shiena commented Jun 17, 2025

This is the result of shlex.split with POSIX disabled on Windows.
image

@shiena
Copy link
Contributor Author

shiena commented Jun 17, 2025

Path parsing works fine on macOS as well.
shlex

@Repiteo Repiteo merged commit e18acc7 into godotengine:master Jun 18, 2025
20 checks passed
@Repiteo
Copy link
Contributor

Repiteo commented Jun 18, 2025

Thanks!

@shiena shiena deleted the fix/windows-path branch June 18, 2025 23:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CXX detection fails on Windows for Android builds
4 participants