1
0
Fork 0
Commit graph

66 commits

Author SHA1 Message Date
Ilya Fedin
ab8fd93cee Try to speed up non-LTO linking with LLD again 2023-09-20 17:46:49 +04:00
Ilya Fedin
900e33b267 Use _FORTIFY_SOURCE=3 supported by GCC 12 2023-09-20 17:46:49 +04:00
Ilya Fedin
975d33e6ae Try to re-enable -pie
Ubuntu 20.04 has new enough shared-mime-info
2023-09-20 17:46:49 +04:00
Ilya Fedin
73d7379276 Move moldefs to the already existing target_link_options block 2023-08-18 15:19:51 +02:00
Ilya Fedin
8316cfd167 Optional library loading on Linux with Implib 2023-08-10 19:27:26 +04:00
John Preston
6d67365e52 Revert "Use fast linking by lld in Debug builds."
This reverts commit f097715e29.

Maybe it will re-enabled after deprecating old systems.
2023-07-14 15:38:23 +04:00
John Preston
f097715e29 Use fast linking by lld in Debug builds. 2023-07-12 21:55:48 +04:00
Ilya Fedin
a1ec454cbc Enable control flow protection 2023-06-06 15:58:06 +04:00
Ilya Fedin
02e600c6f3 Fix non-special target LTO condition
There was a missing $ sign resulting in the condition always being true
While there, deduplicate the false value
2023-06-05 11:27:25 +04:00
Ilya Fedin
d625b4d1ba Get rid of -Ofast on Linux
This seem to make some miscompilation that lead to hangs
2023-05-03 23:45:07 +04:00
Ilya Fedin
556dcb0166 Use QT_DEPRECATED_WARNINGS_SINCE 2023-02-13 16:52:42 +04:00
Ilya Fedin
0ff8f97600 Fix noisy warnings with clang 2022-11-25 11:15:14 +01:00
Ilya Fedin
d41ce7f553 Inherit per-config INTERPROCEDURAL_OPTIMIZATION options
This also fixes the missing -fno-use-linker-plugin in Debug configuration with DESKTOP_APP_SPECIAL_TARGET since the last change
2022-11-18 20:31:01 +04:00
Ilya Fedin
5723b4f274 Fix conditions for LTO-related options on Linux
Currently LTO seem to be always active even when it's not meant to and LTO seem to be broken in debug build.
2022-11-08 23:23:06 +04:00
Ilya Fedin
a3afeeac0e Parallelize LTO on Linux 2022-11-03 13:47:47 +04:00
Ilya Fedin
4294a1872f Silence LTO warnings 2022-11-01 14:36:38 +04:00
Ilya Fedin
700a46e5db Fix LTO in debug build 2022-11-01 14:36:38 +04:00
Ilya Fedin
3c98147427 Set hardening flags only for non-packaged/special target builds 2022-11-01 14:36:38 +04:00
Ilya Fedin
6f96a68508 Revert "Move more compiler options to DESKTOP_APP_SPECIAL_TARGET condition"
This reverts commit 32257877e0.
2022-10-01 08:35:13 +04:00
Ilya Fedin
cd12cb93ea Make target_*_options_if_exists actually work 2022-09-30 11:05:56 +04:00
Ilya Fedin
32257877e0 Move more compiler options to DESKTOP_APP_SPECIAL_TARGET condition 2022-09-30 10:09:46 +04:00
Ilya Fedin
f49e254d8c Fix order of libdl linking 2022-09-23 23:26:09 +04:00
Ilya Fedin
848c16578e Implement target_compile_options_if_exists, target_link_options_if_exists 2022-09-21 16:55:11 +04:00
Ilya Fedin
19aa4dd175 Replace FindThreads with custom logic
It doesn't seem to do what we want, unfortunately...
2022-09-21 08:05:16 +04:00
Ilya Fedin
0702ef4cdd Get rid of DESKTOP_APP_QT6 2022-08-14 10:01:20 +04:00
Ilya Fedin
26d31dbdef Move -fstack-clash-protection to GCC-only flags 2022-05-02 15:09:29 +04:00
Klemens Nanni
205f90ab9e Replace deprecated -W with explicit -Wextra
`-W` looks odd in build logs, I thought it was a missing warning option...
Turns out this has long been superseeded by `-Wexta`, so use that.
2022-03-07 09:57:26 +04:00
Klemens Nanni
ddd1ee547d Introduce DESKTOP_APP_DISABLE_JEMALLOC to enable using system malloc
On at least OpenBSD, malloc(3) is preferred to other implementations
like jemalloc for various reasons.

It is common for portable third-party software (ports) to provide a
switch for en/disabling jemalloc.

tdesktop makes this easy since it does not contain any (je)malloc
specific code (anymore).

Introduce a new default-off option that disables jemalloc when enabled
explicitly;  this also allow developers and package maintainers more
easily to try different malloc implementations, e.g. for debugging.

Memory leaks reported in the slightly old issue
"The app consumes an unexpectedly large amount of RAM"
https://github.com/telegramdesktop/tdesktop/issues/16084 could not
be reproduced on OpenBSD/amd64 with malloc(3) using tdesktop >= 3.3.1.
2022-02-27 19:58:36 +03:00
Ilya Fedin
96d9bcd5ff Don't link linux_jemalloc_helper itself to common_options
TARGET_OBJECTS automatically adds target dependnecy, specyfing linux_jemalloc_helper explicitly breaks library ordering due to cycle dependency
2022-02-15 19:20:04 +03:00
Ilya Fedin
605ad62e11 Restore TARGET_FILE for allocation tracer 2022-02-01 14:38:31 +03:00
Ilya Fedin
167a914da5 Add jemalloc initialization helper 2022-02-01 14:38:31 +03:00
Ilya Fedin
df426419c7 Use LINK_ONLY instead of TARGET_FILE 2022-01-28 23:29:00 +04:00
Ilya Fedin
ab4553e6ee Use Threads in packaged mode as more universal approach 2022-01-22 19:48:21 +03:00
Ilya Fedin
b3cb911ae0 Define _GLIBCXX_ASSERTIONS 2022-01-05 12:54:40 +03:00
Ilya Fedin
10108ea237 Move libdl/libpthread handling to common_options
Setting -pthread makes linking libatomic manually unneeded
2022-01-05 12:54:40 +03:00
Ilya Fedin
f2384057de Use --push-state/--pop-state linker options 2022-01-05 12:54:40 +03:00
John Preston
3440748171 Ignore 'deprecated' warnings because of [=] capturing 'this'. 2021-11-14 11:29:38 +04:00
John Preston
fc65d3305d Revert "Re-enable -pie."
This reverts commit 13331633e5.

AppImage hack fired back: #17183
2021-11-03 21:34:06 +04:00
Ilya Fedin
d5237e224e Make -Wl,-z,now work on older systems 2021-11-02 09:42:00 +04:00
John Preston
13331633e5 Re-enable -pie. 2021-10-31 16:49:13 +04:00
Ilya Fedin
6ef834cf3c Don't warn about deprecated declarations with Qt 6 2021-10-21 10:07:08 +04:00
John Preston
13575af1f3 Remove -pie linker flag.
See https://gitlab.gnome.org/GNOME/nautilus/-/issues/1601
2021-10-08 10:31:21 +04:00
John Preston
f77251b2c1 Remove -Wl,-z,now from the linker flags. 2021-10-06 20:35:08 +04:00
John Preston
18d7c34ce1 Hardening flags only for non-packaged builds. 2021-09-28 22:07:46 +04:00
John Preston
f3a611c82b Add some hardening compiler / linker flags. 2021-09-28 18:44:05 +04:00
Ilya Fedin
dbc1e4fb35 Use whole-program optimization to eliminate linking of unused symbols 2021-09-19 12:28:52 +03:00
Ilya Fedin
a4257299f6 Link libgcc statically in pair with libstdc++ 2021-09-15 11:42:40 +03:00
Ilya Fedin
7ca99a4d08 Adjust --as-needed for allocation tracer and jemalloc 2021-09-12 00:47:59 +03:00
Ilya Fedin
49ca0abd71 Use -Wl,--as-needed 2021-09-12 00:02:59 +03:00
Ilya Fedin
b02fc90612 Get rid of osx and linux32 special targets 2021-08-11 16:01:08 +03:00