diff options
| author | David Lönnhager <david.l@mullvad.net> | 2024-12-02 08:38:28 +0100 |
|---|---|---|
| committer | David Lönnhager <david.l@mullvad.net> | 2024-12-02 14:09:33 +0100 |
| commit | 8f63994ba53d56bbb8ba3c60ab0f70db7a8650e8 (patch) | |
| tree | 6cb39d5108383debaf6ab5f1f890208216a592cb | |
| parent | 3ed024c53913678e1a557bd66b5bef5be774367e (diff) | |
| download | mullvadvpn-8f63994ba53d56bbb8ba3c60ab0f70db7a8650e8.tar.xz mullvadvpn-8f63994ba53d56bbb8ba3c60ab0f70db7a8650e8.zip | |
Add workaround for cargo linker issues in MSVC when targeting i686
When running cargo from MSVC, as of Rust 1.83, it uses build tools
for the target MSVC architecture rather than host, when building
build scripts. Unsetting 'VSTEL_MSBuildProjectFullPath' works around
this issue.
This workaround can be removed once the upstream issue has been fixed:
https://github.com/rust-lang/cc-rs/issues/1308
| -rw-r--r-- | windows/nsis-plugins/src/cleanup/cleanup.vcxproj | 6 | ||||
| -rw-r--r-- | windows/nsis-plugins/src/log/log.vcxproj | 6 |
2 files changed, 8 insertions, 4 deletions
diff --git a/windows/nsis-plugins/src/cleanup/cleanup.vcxproj b/windows/nsis-plugins/src/cleanup/cleanup.vcxproj index f60a100eb5..324264a0c0 100644 --- a/windows/nsis-plugins/src/cleanup/cleanup.vcxproj +++ b/windows/nsis-plugins/src/cleanup/cleanup.vcxproj @@ -75,7 +75,8 @@ <ModuleDefinitionFile>cleanup.def</ModuleDefinitionFile> </Link> <PreBuildEvent> - <Command>cargo build --target i686-pc-windows-msvc --release -p mullvad-nsis</Command> + <Command>powershell.exe -Command "& { Remove-Item Env:VSTEL_MSBuildProjectFullPath; cargo build --target i686-pc-windows-msvc --release -p mullvad-nsis }" +</Command> <Message>Build mullvad-nsis library</Message> </PreBuildEvent> </ItemDefinitionGroup> @@ -105,7 +106,8 @@ <ModuleDefinitionFile>cleanup.def</ModuleDefinitionFile> </Link> <PreBuildEvent> - <Command>cargo build --target i686-pc-windows-msvc --release -p mullvad-nsis</Command> + <Command>powershell.exe -Command "& { Remove-Item Env:VSTEL_MSBuildProjectFullPath; cargo build --target i686-pc-windows-msvc --release -p mullvad-nsis }" +</Command> <Message>Build mullvad-nsis library</Message> </PreBuildEvent> </ItemDefinitionGroup> diff --git a/windows/nsis-plugins/src/log/log.vcxproj b/windows/nsis-plugins/src/log/log.vcxproj index 7509919f19..b80ae3545f 100644 --- a/windows/nsis-plugins/src/log/log.vcxproj +++ b/windows/nsis-plugins/src/log/log.vcxproj @@ -75,7 +75,8 @@ <ModuleDefinitionFile>log.def</ModuleDefinitionFile> </Link> <PreBuildEvent> - <Command>cargo build --target i686-pc-windows-msvc --release -p mullvad-nsis</Command> + <Command>powershell.exe -Command "& { Remove-Item Env:VSTEL_MSBuildProjectFullPath; cargo build --target i686-pc-windows-msvc --release -p mullvad-nsis }" +</Command> <Message>Build mullvad-nsis library</Message> </PreBuildEvent> </ItemDefinitionGroup> @@ -105,7 +106,8 @@ <ModuleDefinitionFile>log.def</ModuleDefinitionFile> </Link> <PreBuildEvent> - <Command>cargo build --target i686-pc-windows-msvc --release -p mullvad-nsis</Command> + <Command>powershell.exe -Command "& { Remove-Item Env:VSTEL_MSBuildProjectFullPath; cargo build --target i686-pc-windows-msvc --release -p mullvad-nsis }" +</Command> <Message>Build mullvad-nsis library</Message> </PreBuildEvent> </ItemDefinitionGroup> |
