diff --git a/.changes/rust-flags-path-quotes.md b/.changes/rust-flags-path-quotes.md new file mode 100644 index 00000000..8dda4b90 --- /dev/null +++ b/.changes/rust-flags-path-quotes.md @@ -0,0 +1,5 @@ +--- +"cargo-mobile2": "patch" +--- + +Generate `.cargo/config.toml` with paths wrapped in quote. diff --git a/src/android/target.rs b/src/android/target.rs index e0379c82..c277c547 100644 --- a/src/android/target.rs +++ b/src/android/target.rs @@ -213,9 +213,10 @@ impl<'a> Target<'a> { linker: Some(linker), rustflags: vec![ "-L".to_owned(), - dunce::simplified(&config.app().prefix_path(".cargo")) - .display() - .to_string(), + format!( + "\"{}\"", + dunce::simplified(&config.app().prefix_path(".cargo")).display() + ), "-Clink-arg=-landroid".to_owned(), "-Clink-arg=-llog".to_owned(), "-Clink-arg=-lOpenSLES".to_owned(),