At the moment __sanitizer_print_memory_profile is only available for Linux. So extend the check for Q_OS_LINUX.
AbandonedPublic

Authored by adridg on Jun 18 2017, 9:17 AM.

Details

Reviewers
lesliezhai
tcberner
Group Reviewers
FreeBSD

Diff Detail

Repository
R467 K3b
Branch
arcpatch-D6254
Lint
No Linters Available
Unit
No Unit Test Coverage
tcberner created this revision.Jun 18 2017, 9:17 AM
adridg added a subscriber: adridg.Jun 18 2017, 1:32 PM

A better version (which tcberner has prepared) checks for the existence of the header file and for the existence of the symbol.

Reason for this is that clang is not sufficient .. clang 3.4 (base compiler in FreeBSD 10) for instance doesn't have it at all, and later clangs do not implement this for non-Linux platforms. You can see k3b in the KDE CI for FreeBSD here: https://build-sandbox.kde.org/job/Applications k3b kf5-qt5 FreeBSDQt5.7/lastFailedBuild/

adridg commandeered this revision.Jun 24 2017, 3:49 PM
adridg added a reviewer: tcberner.

Commandeering this one to upate the patch with tcb's second version.

adridg updated this revision to Diff 15822.Jun 24 2017, 4:02 PM

update with tcberner's newer patch

.. reconsidering. This is internal debugging / memory profiling that is dumped to stdout when some secret(-ish) extra arguments are given to k3b. The interface used was added to clang on march 15th 2017, so it's only available on very-very recent clangs .. I think the right thing to do is just remove this, as "accidentally committed debugging code".

adridg abandoned this revision.Aug 3 2017, 8:41 PM

This was overcome by other changes in src/main.cpp, which were still not valid with older Clang or on FreeBSD. Fixed with other commits.