File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -2202,7 +2202,20 @@ impl Build {
22022202 cmd. arg ( "-g" ) ;
22032203 }
22042204
2205- println ! ( "cargo:warning=The MSVC ARM assemblers do not support -D flags" ) ;
2205+ for & ( ref key, ref value) in self . definitions . iter ( ) {
2206+ cmd. arg ( "-PreDefine" ) ;
2207+ if let Some ( ref value) = * value {
2208+ if let Ok ( i) = value. parse :: < i32 > ( ) {
2209+ cmd. arg ( & format ! ( "{} SETA {}" , key, i) ) ;
2210+ } else if value. starts_with ( '"' ) && value. ends_with ( '"' ) {
2211+ cmd. arg ( & format ! ( "{} SETS {}" , key, value) ) ;
2212+ } else {
2213+ cmd. arg ( & format ! ( "{} SETS \" {}\" " , key, value) ) ;
2214+ }
2215+ } else {
2216+ cmd. arg ( & format ! ( "{} SETL {}" , key, "{TRUE}" ) ) ;
2217+ }
2218+ }
22062219 } else {
22072220 if self . get_debug ( ) {
22082221 cmd. arg ( "-Zi" ) ;
You can’t perform that action at this time.
0 commit comments