@@ -12,7 +12,7 @@ use crate::{
1212
1313use anyhow:: Context ;
1414use cargo_mobile2:: { apple:: target:: Target , opts:: Profile } ;
15- use clap:: Parser ;
15+ use clap:: { ArgAction , Parser } ;
1616use object:: { Object , ObjectSymbol } ;
1717
1818use std:: {
@@ -33,14 +33,14 @@ pub struct Options {
3333 #[ clap( long) ]
3434 sdk_root : PathBuf ,
3535 /// 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 > ,
3838 /// 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 > ,
4141 /// 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 > ,
4444 /// Value of `CONFIGURATION` env var
4545 #[ clap( long) ]
4646 configuration : String ,
@@ -149,15 +149,17 @@ pub fn command(options: Options) -> Result<()> {
149149 include_dir. as_os_str ( ) ,
150150 ) ;
151151
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 ( " " ) ;
156156 host_env. insert (
157157 "GCC_PREPROCESSOR_DEFINITIONS" ,
158- options . gcc_preprocessor_definitions . as_ref ( ) ,
158+ gcc_preprocessor_definitions. as_ref ( ) ,
159159 ) ;
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 ( ) ) ;
161163
162164 let macos_target = Target :: macos ( ) ;
163165
0 commit comments