aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2021-03-26 19:30:13 +0000
committerDaniel Eklöf <daniel@ekloef.se>2021-03-26 19:30:13 +0000
commit9b20764f35094963ecbfc40a972ef54443630447 (patch)
treeab76f3470a6a16e36e32d808f6d75f25389d4974
parentMerge branch 'buffer-size-multiple-of-scale-factor' (diff)
features: --version now logs +/-pgo
That is, whether the binary was compiled with PGO or not.
-rw-r--r--client.c6
-rw-r--r--foot-features.h9
-rw-r--r--main.c6
-rw-r--r--meson.build3
4 files changed, 20 insertions, 4 deletions
diff --git a/client.c b/client.c
index 975269b1..93dcc666 100644
--- a/client.c
+++ b/client.c
@@ -35,8 +35,10 @@ static const char *
version_and_features(void)
{
static char buf[256];
- snprintf(buf, sizeof(buf), "version: %s %cime",
- FOOT_VERSION, feature_ime() ? '+' : '-');
+ snprintf(buf, sizeof(buf), "version: %s %cime %cpgo",
+ FOOT_VERSION,
+ feature_ime() ? '+' : '-',
+ feature_pgo() ? '+' : '-');
return buf;
}
diff --git a/foot-features.h b/foot-features.h
index 8da22f6c..ae00c564 100644
--- a/foot-features.h
+++ b/foot-features.h
@@ -10,3 +10,12 @@ static inline bool feature_ime(void)
return false;
#endif
}
+
+static inline bool feature_pgo(void)
+{
+#if defined(FOOT_PGO_ENABLED) && FOOT_PGO_ENABLED
+ return true;
+#else
+ return false;
+#endif
+}
diff --git a/main.c b/main.c
index 0941d3db..2c14d6d0 100644
--- a/main.c
+++ b/main.c
@@ -45,8 +45,10 @@ static const char *
version_and_features(void)
{
static char buf[256];
- snprintf(buf, sizeof(buf), "version: %s %cime",
- FOOT_VERSION, feature_ime() ? '+' : '-');
+ snprintf(buf, sizeof(buf), "version: %s %cime %cpgo",
+ FOOT_VERSION,
+ feature_ime() ? '+' : '-',
+ feature_pgo() ? '+' : '-');
return buf;
}
diff --git a/meson.build b/meson.build
index 01f27be9..e1b23102 100644
--- a/meson.build
+++ b/meson.build
@@ -24,6 +24,9 @@ add_project_arguments(
(get_option('ime')
? ['-DFOOT_IME_ENABLED=1']
: []) +
+ (get_option('b_pgo') == 'use'
+ ? ['-DFOOT_PGO_ENABLED=1']
+ : []) +
cc.get_supported_arguments(
['-pedantic',
'-fstrict-aliasing',