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 no_std compilation in fontique. #158

Merged
merged 1 commit into from
Nov 5, 2024
Merged

Conversation

xStrom
Copy link
Member

@xStrom xStrom commented Nov 5, 2024

The following command now passes:

cargo check -p fontique --locked --no-default-features --features libm --target x86_64-unknown-none

The key was removing the use of not(any(target_vendor="apple", target_family="windows")) to include std using dependencies, which triggers with x86_64-unknown-none.

I also synced the dependency conditionals with what the code expects.

This is progress towards #86.

@xStrom xStrom mentioned this pull request Nov 5, 2024
core-text = "20.1.0"
core-foundation = "0.9.4"
objc2 = { version = "0.5.2" }
objc2-foundation = { version = "0.2.2", features = ["NSArray", "NSEnumerator", "NSPathUtilities", "NSString"] }

[target.'cfg(not(any(target_vendor="apple", target_family="windows")))'.dependencies]
[target.'cfg(any(target_os = "linux", target_os = "android"))'.dependencies]
Copy link
Contributor

Choose a reason for hiding this comment

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

We don't test it, but would this code path be used on FreeBSD or some of the other target_os things?

One that might be more relevant would be Open Harmony, not sure what they're doing for things like this... (@nicoburns ?)

Copy link
Member Author

Choose a reason for hiding this comment

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

No it wouldn't be used because the code is:

#[cfg(all(feature = "system", target_os = "linux"))]
#[path = "fontconfig/mod.rs"]
mod system;

#[cfg(all(feature = "system", target_os = "android"))]
#[path = "android.rs"]
mod system;

If the code gets support for additional OSes, then the dependencies should as well.

@xStrom xStrom added this pull request to the merge queue Nov 5, 2024
Merged via the queue into linebender:main with commit 77b02ce Nov 5, 2024
20 checks passed
@xStrom xStrom deleted the nostdfontique branch November 5, 2024 15:18
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.

2 participants