summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDudemanguy <random342@airmail.cc>2022-10-29 11:29:26 -0500
committerDudemanguy <random342@airmail.cc>2022-10-29 17:55:33 +0000
commita9e1905a4a2ee9d925c48cb382132dbc10820233 (patch)
tree84de7e2021f38d8f93f9dc6f38e11eddea07dfba
parent0fa5bfae247b6b997a81902dd29d4a29cbe16e0c (diff)
downloadmpv-a9e1905a4a2ee9d925c48cb382132dbc10820233.tar.bz2
mpv-a9e1905a4a2ee9d925c48cb382132dbc10820233.tar.xz
meson: add more hardcoded values to configuration
mpv has a CONFIGURATION define which is defined at configure time in both build systems and printed out when you use verbose flags. In waf, this is line is exactly what the user passes on cli at configure time. In meson, there's currently no way to do that (someone did recently open up a PR that would make this possible), so we just hardcode the prefix and call it a day. This is a bit of a tangent, but the build also copies waf and sets an optimize variable (true or false) that is also printed out on verbose output. For waf, this makes some sense because the build has a specific --optimize option (internally all it does is pass -O2). In meson, optimizing is a built-in option and we just set anything that's not -O0 as "optimize". Furthermore, there is a new optimization option added in meson 0.64 called "plain" which passes no flags at all* so this logic would need to be updated to account for this. In retrospect, this is all just stupid though. optimization is not a boolean value and there's no real use for treating it like one just because that's what waf does. Let's remove it from the features array. Instead, we can expose this information in the CONFIGURATION variable along with the prefix option so we know exactly what optimization was used in the compiled executable. For good measure, let's also throw in buildtype since it's related. *: https://github.com/mesonbuild/meson/commit/a590cfde0cf719c637b75e4784be0c0ae60e3b1f
-rw-r--r--meson.build12
1 files changed, 6 insertions, 6 deletions
diff --git a/meson.build b/meson.build
index 574baf2bb3..2de7314f33 100644
--- a/meson.build
+++ b/meson.build
@@ -44,7 +44,6 @@ features = {
'gpl': get_option('gpl'),
'jpegxl': libavformat.version().version_compare('>= 59.27.100'),
'libass': true,
- 'optimize': get_option('optimization') != '0',
'threads': true,
}
@@ -1587,11 +1586,12 @@ if features['pdf-build']
endif
-# We can't easily get every single thing a user might have passed on the cli,
-# but we might as well add prefix (even if it's not specifically set) since
-# it's highly relevant and useful.
-configuration = 'meson configure build '
-configuration += '-Dprefix=' + get_option('prefix')
+# Currently, we can't easily get every single thing a user might have passed
+# on the cli, but we might as well just hardcode a few options (even if they are
+# not specifically set) for verbosity's sake.
+configuration = 'meson configure build ' + '-Dprefix=' + get_option('prefix') + \
+ ' -Dbuildtype=' + get_option('buildtype') + \
+ ' -Doptimization=' + get_option('optimization')
features += {'cplayer': get_option('cplayer')}
features += {'libmpv-' + get_option('default_library'): get_option('libmpv')}