You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It appears that s2n-quic-platform/build.rs is trying to identify platform support for sendmsg/sendmmsg (and recv variants) at build time. However, the features/socket_mmsg.rs and features/socket_msg.rs are not actually ever compiled by build.rs, so this detection never happens.
One can test this simply by putting junk into any file in s2n-quic-platform/features and the build will still succeed.
Solution:
build.rs should probably attempt to run rustc on files in the features directory instead of just including them in cargo:rerun-if-changed. Alternatively, maybe there's a method to inform cargo via build.rs output that the file needs to be compiled, but rerun-if-changed does not do that.
Requirements / Acceptance Criteria:
cargo rustc -p s2n-quic-platform -- --print cfg will not print out s2n_quic_platform_socket_mmsg on platforms which do not support mmsg, and analogous for platforms which do not support msg. I'm not actually sure these platforms exist or are easy to find, so an alternative acceptance criteria is ensuring that putting a non-compilable file into features.rs does actually fail the build.
The text was updated successfully, but these errors were encountered:
Problem:
It appears that s2n-quic-platform/build.rs is trying to identify platform support for sendmsg/sendmmsg (and recv variants) at build time. However, the
features/socket_mmsg.rs
andfeatures/socket_msg.rs
are not actually ever compiled bybuild.rs
, so this detection never happens.One can test this simply by putting junk into any file in
s2n-quic-platform/features
and the build will still succeed.Solution:
build.rs
should probably attempt to runrustc
on files in thefeatures
directory instead of just including them incargo:rerun-if-changed
. Alternatively, maybe there's a method to inform cargo via build.rs output that the file needs to be compiled, but rerun-if-changed does not do that.Requirements / Acceptance Criteria:
cargo rustc -p s2n-quic-platform -- --print cfg
will not print outs2n_quic_platform_socket_mmsg
on platforms which do not supportmmsg
, and analogous for platforms which do not supportmsg
. I'm not actually sure these platforms exist or are easy to find, so an alternative acceptance criteria is ensuring that putting a non-compilable file intofeatures.rs
does actually fail the build.The text was updated successfully, but these errors were encountered: