Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix native builds on Windows ARM64 machines #7432

Merged
merged 2 commits into from
Jul 13, 2020

Conversation

nirbheek
Copy link
Member

I made the mistake of always selecting the debug CRT for compiler checks on Windows 4 years ago: #543 #614

The idea was to always build the tests with debugging enabled so that the compiler doesn't optimize the tests away. But we stopped doing that a while ago, and also the debug CRT has no relation to that.

We should select the CRT in the same way that we do for building targets: based on the options.

On Windows ARM64, the debug CRT for ARM64 isn't always available, and the release CRT is available only after installing the runtime package. Without this, we will always try to pick the debug CRT even when --buildtype=debugoptimized or release.

@nirbheek nirbheek added the OS:windows Winodows OS specific issues label Jul 11, 2020
@nirbheek nirbheek requested a review from jpakkane as a code owner July 11, 2020 18:42
@nirbheek
Copy link
Member Author

CC: @seungha-yang

@nirbheek nirbheek force-pushed the nirbheek/fix-native-windows-arm64-builds branch from afc7d8d to ab56319 Compare July 11, 2020 18:49
@seungha-yang
Copy link
Contributor

I can confirm this will fix my gst-build build issue (native ARM64 with Surface Pro X + Visual Studio 2019). Thanks @nirbheek

I made the mistake of always selecting the debug CRT for compiler
checks on Windows 4 years ago:
#543
#614

The idea was to always build the tests with debugging enabled so that
the compiler doesn't optimize the tests away. But we stopped doing
that a while ago, and also the debug CRT has no relation to that.

We should select the CRT in the same way that we do for building
targets: based on the options.

On Windows ARM64, the debug CRT for ARM64 isn't always available, and
the release CRT is available only after installing the runtime
package. Without this, we will always try to pick the debug CRT even
when --buildtype=debugoptimized or release.
@nirbheek nirbheek force-pushed the nirbheek/fix-native-windows-arm64-builds branch from ab56319 to 9727bdc Compare July 12, 2020 08:57
vc2017x64vs and vc2019x64vs sometimes timeout because they exceed the
60 min default limit.
@nirbheek nirbheek added this to the 0.55.1 milestone Jul 13, 2020
@nirbheek nirbheek merged commit a672ffa into master Jul 13, 2020
@nirbheek nirbheek deleted the nirbheek/fix-native-windows-arm64-builds branch July 13, 2020 15:28
nirbheek added a commit to nirbheek/meson that referenced this pull request Aug 25, 2020
This type happened in mesonbuild#7432
and wasn't noticed because I didn't add a test for it. Rectified now.

If we don't specify the CRT, MSVC will pick /MT by default (!?) and
link to `libcmt.lib`. This actually *breaks* UWP because `libcmt.lib`
is not available by default when building for UWP.

Was noticed here: cisco/libsrtp#505
nirbheek added a commit to nirbheek/meson that referenced this pull request Aug 25, 2020
This type happened in mesonbuild#7432
and wasn't noticed because I didn't add a test for it. Rectified now.

If we don't specify the CRT, MSVC will pick /MT by default (!?) and
link to `libcmt.lib`. This actually *breaks* UWP because `libcmt.lib`
is not available by default when building for UWP.

Was noticed here: cisco/libsrtp#505
nirbheek added a commit that referenced this pull request Aug 27, 2020
This type happened in #7432
and wasn't noticed because I didn't add a test for it. Rectified now.

If we don't specify the CRT, MSVC will pick /MT by default (!?) and
link to `libcmt.lib`. This actually *breaks* UWP because `libcmt.lib`
is not available by default when building for UWP.

Was noticed here: cisco/libsrtp#505
nirbheek added a commit that referenced this pull request Sep 9, 2020
This type happened in #7432
and wasn't noticed because I didn't add a test for it. Rectified now.

If we don't specify the CRT, MSVC will pick /MT by default (!?) and
link to `libcmt.lib`. This actually *breaks* UWP because `libcmt.lib`
is not available by default when building for UWP.

Was noticed here: cisco/libsrtp#505
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
OS:windows Winodows OS specific issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants