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
Ilya Fedin
24543509c1
Use libc++ with clang
2021-08-08 09:26:18 +03:00
Ilya Fedin
3fbee998ae
Move flags non-qt-related flags from external_qt to common_options
2021-08-08 09:26:18 +03:00
Ilya Fedin
f7ccab0e7c
Allow LTO with clang
...
Seem to work fine
2021-08-08 09:26:18 +03:00
Ilya Fedin
b3f3876c5f
Activate fixed warnings
2021-07-19 20:35:33 +03:00
Ilya Fedin
1c8cfe49c5
Clang build fixes
2021-07-13 20:28:33 +03:00
Ilya Fedin
8d7772ab33
Switch from mallocng to jemalloc
2021-07-01 21:03:06 +03:00
John Preston
8414d2aa3a
Fix external_webrtc for Linux.
2020-08-11 13:56:54 +04:00
Ilya Fedin
f05e28c8da
Replace DESKTOP_APP_USE_PACKAGED with DESKTOP_APP_SPECIAL_TARGET in some places
2020-08-10 15:32:52 +04:00
John Preston
28ff839711
Fix linking with glibc wraps, libatomic.
2020-07-26 12:13:41 +04:00
Ilya Fedin
3f73163b06
Link libatomic statically
2020-07-25 11:31:37 +04:00
Ilya Fedin
2acd52d39a
Set link options only without DESKTOP_APP_USE_PACKAGED
2020-07-23 14:09:17 +04:00
Ilya Fedin
0417330cc9
Add atomic library to common options for better compaibility with non-x86 archs
2020-07-23 14:09:17 +04:00
Ilya Fedin
1db22f3663
Make packaged build working
2020-01-16 11:32:32 +04:00
John Preston
0340f72294
Fix build on Linux 32bit.
2019-12-05 11:08:07 +03:00
John Preston
af968dc8ea
Initial Linux build.
2019-12-03 19:06:31 +03:00
John Preston
118ce81dd4
Add more options and external_ libs.
2019-11-21 14:54:37 +03:00