@@ -12,7 +12,7 @@ use crate::{
12
12
13
13
use anyhow:: Context ;
14
14
use cargo_mobile2:: { apple:: target:: Target , opts:: Profile } ;
15
- use clap:: Parser ;
15
+ use clap:: { ArgAction , Parser } ;
16
16
use object:: { Object , ObjectSymbol } ;
17
17
18
18
use std:: {
@@ -33,14 +33,14 @@ pub struct Options {
33
33
#[ clap( long) ]
34
34
sdk_root : PathBuf ,
35
35
/// Value of `FRAMEWORK_SEARCH_PATHS` env var
36
- #[ clap( long) ]
37
- framework_search_paths : String ,
36
+ #[ clap( long, action = ArgAction :: Append , num_args ( 0 .. ) ) ]
37
+ framework_search_paths : Vec < String > ,
38
38
/// Value of `GCC_PREPROCESSOR_DEFINITIONS` env var
39
- #[ clap( long) ]
40
- gcc_preprocessor_definitions : String ,
39
+ #[ clap( long, action = ArgAction :: Append , num_args ( 0 .. ) ) ]
40
+ gcc_preprocessor_definitions : Vec < String > ,
41
41
/// Value of `HEADER_SEARCH_PATHS` env var
42
- #[ clap( long) ]
43
- header_search_paths : String ,
42
+ #[ clap( long, action = ArgAction :: Append , num_args ( 0 .. ) ) ]
43
+ header_search_paths : Vec < String > ,
44
44
/// Value of `CONFIGURATION` env var
45
45
#[ clap( long) ]
46
46
configuration : String ,
@@ -149,15 +149,17 @@ pub fn command(options: Options) -> Result<()> {
149
149
include_dir. as_os_str ( ) ,
150
150
) ;
151
151
152
- host_env . insert (
153
- "FRAMEWORK_SEARCH_PATHS" ,
154
- options . framework_search_paths . as_ref ( ) ,
155
- ) ;
152
+ let framework_search_paths = options . framework_search_paths . join ( " " ) ;
153
+ host_env . insert ( "FRAMEWORK_SEARCH_PATHS" , framework_search_paths . as_ref ( ) ) ;
154
+
155
+ let gcc_preprocessor_definitions = options . gcc_preprocessor_definitions . join ( " " ) ;
156
156
host_env. insert (
157
157
"GCC_PREPROCESSOR_DEFINITIONS" ,
158
- options . gcc_preprocessor_definitions . as_ref ( ) ,
158
+ gcc_preprocessor_definitions. as_ref ( ) ,
159
159
) ;
160
- host_env. insert ( "HEADER_SEARCH_PATHS" , options. header_search_paths . as_ref ( ) ) ;
160
+
161
+ let header_search_paths = options. header_search_paths . join ( " " ) ;
162
+ host_env. insert ( "HEADER_SEARCH_PATHS" , header_search_paths. as_ref ( ) ) ;
161
163
162
164
let macos_target = Target :: macos ( ) ;
163
165
0 commit comments