Skip to content

Commit dbd380b

Browse files
committed
Add support for uwp targets
1 parent 0409188 commit dbd380b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/lib.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1219,7 +1219,8 @@ impl Build {
12191219
cmd.push_cc_arg("-ffunction-sections".into());
12201220
cmd.push_cc_arg("-fdata-sections".into());
12211221
}
1222-
if self.pic.unwrap_or(!target.contains("windows-gnu")) {
1222+
if self.pic.unwrap_or(!target.contains("windows-gnu") &&
1223+
!target.contains("uwp-gnu")) {
12231224
cmd.push_cc_arg("-fPIC".into());
12241225
// PLT only applies if code is compiled with PIC support,
12251226
// and only for ELF targets.
@@ -1781,6 +1782,8 @@ impl Build {
17811782
"armv7-unknown-netbsd-eabihf" => Some("armv7--netbsdelf-eabihf"),
17821783
"i586-unknown-linux-musl" => Some("musl"),
17831784
"i686-pc-windows-gnu" => Some("i686-w64-mingw32"),
1785+
"i686-pc-uwp-gnu" => Some("i686-w64-mingw32"),
1786+
"x86_64-pc-uwp-gnu" => Some("x86_64-w64-mingw32"),
17841787
"i686-unknown-linux-musl" => Some("musl"),
17851788
"i686-unknown-netbsd" => Some("i486--netbsdelf"),
17861789
"mips-unknown-linux-gnu" => Some("mips-linux-gnu"),

0 commit comments

Comments
 (0)