如何传递' Cflags涉及货物中的依赖性?

发布于 2025-02-14 01:41:03 字数 227 浏览 0 评论 0原文

是否有一些魔术可以添加到cargo.toml的依赖项条目中,以指定环境变量(例如,cflags)或在构建依赖关系时要使用的其他上下文(和唯一的这个依赖性)?

背景:这是专门针对依赖板箱是基于C的API/软件包SQLITE的包装器/构建器(即,rusqlite)。 AS-IS板条将一些论点传递给了不支持的目标C编译器。

Is there some magic that can be added to a dependency entry of Cargo.toml to specify environment variables (e.g., CFLAGS) or other context to be used when building the dependency (and only this dependency)?

Background: this is specifically for a case where a dependency crate is a wrapper/builder for a C-based API/package sqlite (i.e., rusqlite). The as-is crate passes some arguments to the target C compiler that aren't supported.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文