@@ -164,17 +164,18 @@ class MachCommands(CommandBase):
164
164
@CommandArgument ('--very-verbose' , '-vv' ,
165
165
action = 'store_true' ,
166
166
help = 'Print very verbose output' )
167
- @CommandArgument ('--win-arm64' , action = 'store_true' , help = "Use arm64 Windows target" )
168
167
@CommandArgument ('params' , nargs = '...' ,
169
168
help = "Command-line arguments to be passed through to Cargo" )
170
169
@CommandBase .build_like_command_arguments
171
170
def build (self , release = False , dev = False , jobs = None , params = None ,
172
171
no_package = False , verbose = False , very_verbose = False ,
173
- target = None , android = False , magicleap = False , libsimpleservo = False , uwp = False ,
174
- features = None , win_arm64 = False , ** kwargs ):
172
+ target = None , android = False , magicleap = False , libsimpleservo = False ,
173
+ features = None , ** kwargs ):
175
174
opts = params or []
176
175
features = features or []
176
+
177
177
target , android = self .pick_target_triple (target , android , magicleap )
178
+ uwp = target and 'uwp' in target
178
179
179
180
target_path = base_path = self .get_target_dir ()
180
181
if android :
@@ -220,14 +221,8 @@ def build(self, release=False, dev=False, jobs=None, params=None,
220
221
if very_verbose :
221
222
opts += ["-vv" ]
222
223
223
- if win_arm64 :
224
- if target :
225
- print ("Can't specify explicit --target value with --win-arm64." )
226
- sys .exit (1 )
227
- target = "aarch64-pc-windows-msvc"
228
-
229
224
if target :
230
- if self .config ["tools" ]["use-rustup" ]:
225
+ if self .config ["tools" ]["use-rustup" ] and not uwp :
231
226
# 'rustup target add' fails if the toolchain is not installed at all.
232
227
self .call_rustup_run (["rustc" , "--version" ])
233
228
@@ -265,6 +260,10 @@ def build(self, release=False, dev=False, jobs=None, params=None,
265
260
env ['PKG_CONFIG_ALLOW_CROSS' ] = "1"
266
261
267
262
if uwp :
263
+ # Ensure libstd is ready for the new UWP target.
264
+ check_call (["rustup" , "component" , "add" , "rust-src" ])
265
+ env ['RUST_SYSROOT' ] = path .expanduser ('~\\ .xargo' )
266
+
268
267
# Don't try and build a desktop port.
269
268
libsimpleservo = True
270
269
@@ -943,7 +942,7 @@ def package_msvc_dlls(servo_exe_dir, target, vcinstalldir, vs_version):
943
942
"msvcp140.dll" ,
944
943
"vcruntime140.dll" ,
945
944
]
946
- if target_arch != "aarch64" and vs_version in ("14.0" , "15.0" , "16.0" ):
945
+ if target_arch != "aarch64" and "uwp" not in target and vs_version in ("14.0" , "15.0" , "16.0" ):
947
946
msvc_deps += ["api-ms-win-crt-runtime-l1-1-0.dll" ]
948
947
949
948
# Check if it's Visual C++ Build Tools or Visual Studio 2015
0 commit comments