diff options
author | Nirbheek Chauhan <nirbheek@centricular.com> | 2020-07-06 20:15:27 +0530 |
---|---|---|
committer | GStreamer Merge Bot <gitlab-merge-bot@gstreamer-foundation.org> | 2020-07-07 15:18:16 +0000 |
commit | 678601d2f5629950dae085e7ace11ae93ac38eb2 (patch) | |
tree | c43bae7f6a3dd84beb2ffa9682b5541fb331a676 | |
parent | 10cab6d777bfb38fbbaa065837a441af0defdea4 (diff) |
cerbero: Add an assertion for UWP builds
When UWP builds are enabled, we should not accidentally select recipes
that can't be built with MSVC. Error out if that case happens.
Same if the visualstudio variant wasn't implicitly set.
Part-of: <https://gitlab.freedesktop.org/gstreamer/cerbero/-/merge_requests/538>
-rw-r--r-- | cerbero/build/build.py | 8 | ||||
-rw-r--r-- | recipes/ca-certificates.recipe | 2 | ||||
-rw-r--r-- | recipes/gst-shell.recipe | 1 |
3 files changed, 9 insertions, 2 deletions
diff --git a/cerbero/build/build.py b/cerbero/build/build.py index 7e01e93c..64357237 100644 --- a/cerbero/build/build.py +++ b/cerbero/build/build.py @@ -328,10 +328,14 @@ class Build(object): return True def using_uwp(self): - if not self.using_msvc(): - return False if not self.config.variants.uwp: return False + # When the uwp variant is enabled, we must never select recipes that + # don't have can_msvc = True + if not self.can_msvc: + raise RuntimeError("Tried to build a recipe that can't use MSVC when using UWP") + if not self.config.variants.visualstudio: + raise RuntimeError("visualstudio variant wasn't set when uwp variant was set") return True async def configure(self): diff --git a/recipes/ca-certificates.recipe b/recipes/ca-certificates.recipe index a35d4a8a..650293af 100644 --- a/recipes/ca-certificates.recipe +++ b/recipes/ca-certificates.recipe @@ -13,6 +13,8 @@ class Recipe(recipe.Recipe): stype = SourceType.CUSTOM btype = BuildType.CUSTOM + can_msvc = True + files_etc = [ 'etc/ssl/certs/ca-certificates.crt', ] diff --git a/recipes/gst-shell.recipe b/recipes/gst-shell.recipe index f8686afc..4e9be948 100644 --- a/recipes/gst-shell.recipe +++ b/recipes/gst-shell.recipe @@ -8,6 +8,7 @@ class Recipe(recipe.Recipe): licenses = [License.LGPLv2_1Plus] btype = BuildType.CUSTOM stype = SourceType.CUSTOM + can_msvc = True files_shell = ['bin/gst-shell', 'share/gstreamer/gst-env'] |