mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-04-09 08:21:01 -04:00
features: --version now logs +/-pgo
That is, whether the binary was compiled with PGO or not.
This commit is contained in:
parent
649820eeba
commit
9b20764f35
4 changed files with 20 additions and 4 deletions
6
client.c
6
client.c
|
|
@ -35,8 +35,10 @@ static const char *
|
||||||
version_and_features(void)
|
version_and_features(void)
|
||||||
{
|
{
|
||||||
static char buf[256];
|
static char buf[256];
|
||||||
snprintf(buf, sizeof(buf), "version: %s %cime",
|
snprintf(buf, sizeof(buf), "version: %s %cime %cpgo",
|
||||||
FOOT_VERSION, feature_ime() ? '+' : '-');
|
FOOT_VERSION,
|
||||||
|
feature_ime() ? '+' : '-',
|
||||||
|
feature_pgo() ? '+' : '-');
|
||||||
return buf;
|
return buf;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -10,3 +10,12 @@ static inline bool feature_ime(void)
|
||||||
return false;
|
return false;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline bool feature_pgo(void)
|
||||||
|
{
|
||||||
|
#if defined(FOOT_PGO_ENABLED) && FOOT_PGO_ENABLED
|
||||||
|
return true;
|
||||||
|
#else
|
||||||
|
return false;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
|
||||||
6
main.c
6
main.c
|
|
@ -45,8 +45,10 @@ static const char *
|
||||||
version_and_features(void)
|
version_and_features(void)
|
||||||
{
|
{
|
||||||
static char buf[256];
|
static char buf[256];
|
||||||
snprintf(buf, sizeof(buf), "version: %s %cime",
|
snprintf(buf, sizeof(buf), "version: %s %cime %cpgo",
|
||||||
FOOT_VERSION, feature_ime() ? '+' : '-');
|
FOOT_VERSION,
|
||||||
|
feature_ime() ? '+' : '-',
|
||||||
|
feature_pgo() ? '+' : '-');
|
||||||
return buf;
|
return buf;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,9 @@ add_project_arguments(
|
||||||
(get_option('ime')
|
(get_option('ime')
|
||||||
? ['-DFOOT_IME_ENABLED=1']
|
? ['-DFOOT_IME_ENABLED=1']
|
||||||
: []) +
|
: []) +
|
||||||
|
(get_option('b_pgo') == 'use'
|
||||||
|
? ['-DFOOT_PGO_ENABLED=1']
|
||||||
|
: []) +
|
||||||
cc.get_supported_arguments(
|
cc.get_supported_arguments(
|
||||||
['-pedantic',
|
['-pedantic',
|
||||||
'-fstrict-aliasing',
|
'-fstrict-aliasing',
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue