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

Fix: Accept non utf-8 characters in compiler and archiver #998

Merged
merged 5 commits into from
Mar 7, 2024

Conversation

NobodyXu
Copy link
Collaborator

@NobodyXu NobodyXu commented Mar 7, 2024

While the compiler automatically detected by cc always is a valid str, it is possible for user to override them using environment variable CC, CXX and AR, which could contain non utf-8 characters.

Before this PR is applied, cc uses to_string_lossy() to convert it to a valid str which might cause the creation of process to fail.

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
They are only used in `Build::compile_objects` with `&Path`,
so there is no need to use generics.

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
@NobodyXu NobodyXu merged commit 2a0bf2b into main Mar 7, 2024
42 checks passed
@NobodyXu NobodyXu deleted the fix/compile-family-detection branch March 7, 2024 10:23
Copy link
Member

@thomcc thomcc left a comment

Choose a reason for hiding this comment

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

Looks fine.

(I feel good enough to start easing myself back into reviews of small stuff like this)

@thomcc
Copy link
Member

thomcc commented Mar 7, 2024

Oh, it was already reviewed.

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.

3 participants