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 crash if "platform": "mips64" is used #1454

Merged
merged 1 commit into from
Jul 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/vcpkg/platform-expression.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -571,6 +571,7 @@ namespace vcpkg::PlatformExpression
case Identifier::qnx: return true_if_exists_and_equal("VCPKG_CMAKE_SYSTEM_NAME", "QNX");
case Identifier::vxworks: return true_if_exists_and_equal("VCPKG_CMAKE_SYSTEM_NAME", "VxWorks");
case Identifier::wasm32: return true_if_exists_and_equal("VCPKG_TARGET_ARCHITECTURE", "wasm32");
case Identifier::mips64: return true_if_exists_and_equal("VCPKG_TARGET_ARCHITECTURE", "mips64");
case Identifier::static_link:
return true_if_exists_and_equal("VCPKG_LIBRARY_LINKAGE", "static");
case Identifier::static_crt: return true_if_exists_and_equal("VCPKG_CRT_LINKAGE", "static");
Expand All @@ -584,8 +585,8 @@ namespace vcpkg::PlatformExpression

return is_native->second == "1";
}
default: Checks::unreachable(VCPKG_LINE_INFO);
}
Checks::unreachable(VCPKG_LINE_INFO);
Comment on lines -587 to +589
Copy link
Contributor Author

Choose a reason for hiding this comment

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

So that this causes a warning and it catched by -Werror

}
else if (expr.kind == ExprKind::op_not)
{
Expand Down
Loading