-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(build.rs): use CARGO_CFG_TARGET_OS and target_os android (#81)
In a `build.rs` file `cfg(target_os = "linux")` refers to the target OS of the `build.rs` binary. The environment variable `CARGO_CFG_TARGET_OS` refers to the target OS of the final binary. When cross-compiling, the target OS of the `build.rs` binary and the target OS of the final binary are not the same. The `mtu`'s `build.rs` should use `CARGO_CFG_TARGET_OS`. In addition, `cfg(target_os = "linux")` does not include `android`. This commit `cfg`s `linux` and `android` everywhere.
- Loading branch information
Showing
5 changed files
with
29 additions
and
24 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ homepage = "https://github.com/mozilla/mtu/" | |
repository = "https://github.com/mozilla/mtu/" | ||
authors = ["The Mozilla Necko Team <[email protected]>"] | ||
readme = "README.md" | ||
version = "0.2.4" | ||
version = "0.2.5" | ||
edition = "2021" | ||
license = "MIT OR Apache-2.0" | ||
# Don't increase beyond what Firefox is currently using: | ||
|
@@ -37,8 +37,6 @@ windows = { version = ">=0.58,<0.60", features = [ | |
[build-dependencies] | ||
cfg_aliases = { version = "0.2", default-features = false } | ||
mozbuild = { version = "0.1", default-features = false, optional = true } | ||
|
||
[target.'cfg(not(windows))'.build-dependencies] | ||
# Don't increase beyond what Firefox is currently using: https://searchfox.org/mozilla-central/source/Cargo.lock | ||
bindgen = { version = "0.69", default-features = false, features = ["runtime"] } | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters