-
Notifications
You must be signed in to change notification settings - Fork 73
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
Cross compile fixes #153
base: master
Are you sure you want to change the base?
Cross compile fixes #153
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,7 +12,7 @@ keywords = ["littlevgl", "lvgl", "graphical_interfaces"] | |
build = "build.rs" | ||
|
||
[dependencies] | ||
lvgl-sys = { version = "0.6.2", path = "../lvgl-sys" } | ||
lvgl-sys = { version = "0.6.2", path = "../lvgl-sys", features = ["library"]} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Tiny nit; here (and line 80) add a space before the curly brace for stylistic consistency |
||
cty = "0.2.2" | ||
embedded-graphics = { version = "0.8.0", optional = true } | ||
cstr_core = { version = "0.2.6", default-features = false, features = ["alloc"] } | ||
|
@@ -77,7 +77,7 @@ unsafe_no_autoinit = [] | |
quote = "1.0.23" | ||
proc-macro2 = "1.0.51" | ||
lvgl-codegen = { version = "0.6.2", path = "../lvgl-codegen" } | ||
lvgl-sys = { version = "0.6.2", path = "../lvgl-sys" } | ||
lvgl-sys = { version = "0.6.2", path = "../lvgl-sys", features = ["raw-bindings"]} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. v2 of the cargo feature resolver does not unify features on crates compiled multiple times. If this and the above both specify both features for There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That defeats the entire purpose of this PR, which is to prevent building the library for lvgl's build.rs executable There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Although this does only apply to cross-compilation, if There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why not check for that in the build script & enable features from there by There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. When lvgl-sys is compiled for the build script executable, target is always the same as host (since build scripts must run on the host). So in this case there is no way to find out the actual target. CROSS_COMPILE is just some standard used, the cc crate supports it so I thought it made sense to use it for the bindings. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we gate this behind a flag or feature, then, so that we don't always compile twice? Feels like a pretty big cost still. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this the only thing preventing this PR from landing? If so, this can just have a And this will apply to the normal dependency and the build dependency confirmed |
||
|
||
[dev-dependencies] | ||
embedded-graphics-simulator = "0.5.0" | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This may be set incorrectly or by some other process (or accidentally left in a shell); may be worth falling back to the
TARGET
var if compile fails with this and warn