File tree 5 files changed +9
-7
lines changed
5 files changed +9
-7
lines changed Original file line number Diff line number Diff line change 2
2
name = " system-deps-binary"
3
3
version = " 0.1.0"
4
4
edition = " 2021"
5
- links = " system-deps-binary"
6
5
7
6
[build-dependencies ]
8
7
system-deps-meta = { path = " ../meta" }
Original file line number Diff line number Diff line change @@ -115,7 +115,7 @@ fn paths() -> HashMap<String, Vec<PathBuf>> {
115
115
let mut follow_list = HashMap :: new ( ) ;
116
116
117
117
// Global overrides from environment
118
- // TODO: This need to come first
118
+ // TODO: Change this so the env set global url always is first in the list of paths
119
119
if let Some ( url) = env ( "SYSTEM_DEPS_BINARY_URL" ) {
120
120
let checksum = env ( "SYSTEM_DEPS_BINARY_CHECKSUM" ) ;
121
121
let pkg_paths = env ( "SYSTEM_DEPS_BINARY_PKG_PATHS" ) ;
Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ fn find_by_path(mut dir: PathBuf) -> Option<PathBuf> {
50
50
/// Get the manifest from the project directory. This is **not** the directory
51
51
/// where `system-deps` is cloned, it should point to the top level `Cargo.toml`
52
52
/// file. This is needed to obtain metadata from all of dependencies, including
53
- /// those upstream of the package being compiled.
53
+ /// those downstream of the package being compiled.
54
54
///
55
55
/// If the target directory is not a subfolder of the project it will not be
56
56
/// possible to detect it automatically. In this case, the user will be asked
Original file line number Diff line number Diff line change @@ -40,6 +40,8 @@ fn check_cfg(lit: &str) -> Option<bool> {
40
40
41
41
/// Inserts values from b into a only if they don't already exist.
42
42
/// TODO: This function could be a lot cleaner and it needs better error handling.
43
+ /// The logic for merging values needs to handle more cases so during testing this will have to be rewritten.
44
+ /// Additionally, make sure that only downstream crates can override the metadata.
43
45
fn merge ( a : & mut Value , b : Value ) {
44
46
match ( a, b) {
45
47
( a @ & mut Value :: Object ( _) , Value :: Object ( b) ) => {
@@ -66,7 +68,7 @@ fn merge(a: &mut Value, b: Value) {
66
68
}
67
69
68
70
/// Recursively read dependency manifests to find metadata matching a key.
69
- /// The matching metadata is aggregated in a list, with upstream crates having priority
71
+ /// The matching metadata is aggregated in a list, with downstream crates having priority
70
72
/// for overwriting values. It will only read from the metadata sections matching the
71
73
/// provided key.
72
74
///
Original file line number Diff line number Diff line change @@ -934,9 +934,10 @@ impl Config {
934
934
combined_pkg_config_path. extend_from_slice ( & pkg_config_path) ;
935
935
936
936
// should the lib be statically linked?
937
- let statik = self
938
- . env
939
- . has_value ( & EnvVariable :: new_link ( Some ( name) ) , "static" )
937
+ let statik = cfg ! ( feature = "binary" )
938
+ || self
939
+ . env
940
+ . has_value ( & EnvVariable :: new_link ( Some ( name) ) , "static" )
940
941
|| self . env . has_value ( & EnvVariable :: new_link ( None ) , "static" ) ;
941
942
942
943
let mut library = if self . env . contains ( & EnvVariable :: new_no_pkg_config ( name) ) {
You can’t perform that action at this time.
0 commit comments