From 3a3dc1bae31e9be9adb8f9220d47ca74bf3e6d59 Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Thu, 18 Oct 2018 14:13:12 +0200 Subject: [PATCH] Add perfparser as a submodule Task-number: QTCREATORBUG-21348 Change-Id: I2f7e4aa97e554d7042db05c952c46ed7ac199dbe Reviewed-by: Orgad Shaneh Reviewed-by: Alessandro Portale --- .gitmodules | 4 ++++ src/tools/perfparser | 1 + src/tools/tools.pro | 29 +++++++++++++++++++++++++++++ src/tools/tools.qbs | 8 ++++++++ 4 files changed, 42 insertions(+) create mode 160000 src/tools/perfparser diff --git a/.gitmodules b/.gitmodules index ee0a99fda75..6fdaf4283fd 100644 --- a/.gitmodules +++ b/.gitmodules @@ -2,3 +2,7 @@ path = src/shared/qbs url = ../../qbs/qbs.git ignore = dirty +[submodule "perfparser"] + path = src/tools/perfparser + url = ../perfparser.git + ignore = dirty diff --git a/src/tools/perfparser b/src/tools/perfparser new file mode 160000 index 00000000000..28751d2232d --- /dev/null +++ b/src/tools/perfparser @@ -0,0 +1 @@ +Subproject commit 28751d2232d6e04fdef3db72e0e7b77055bafc45 diff --git a/src/tools/tools.pro b/src/tools/tools.pro index 07246b95fe4..9fad57d6933 100644 --- a/src/tools/tools.pro +++ b/src/tools/tools.pro @@ -49,3 +49,32 @@ isEmpty(BUILD_CPLUSPLUS_TOOLS):BUILD_CPLUSPLUS_TOOLS=$$(BUILD_CPLUSPLUS_TOOLS) } } } + +exists(perfparser/perfparser.pro) { + win32 { + SUBDIRS += perfparser + PERFPARSER_APP_DESTDIR = $$IDE_BUILD_TREE/bin + PERFPARSER_APP_INSTALLDIR = $$QTC_PREFIX/bin + + # On windows we take advantage of the fixed path in eblopenbackend.c: "..\lib\elfutils\" + PERFPARSER_ELFUTILS_INSTALLDIR = $$QTC_PREFIX/bin + PERFPARSER_ELFUTILS_BACKENDS_INSTALLDIR = $$QTC_PREFIX/lib/elfutils + } else { + SUBDIRS += perfparser + PERFPARSER_APP_DESTDIR = $$IDE_BUILD_TREE/libexec/qtcreator + PERFPARSER_APP_INSTALLDIR = $$QTC_PREFIX/libexec/qtcreator + + # On linux we have "$ORIGIN/../$LIB/elfutils" in eblopenbackend.c. Unfortunately $LIB can + # be many different things, so we target the second try where it just loads the plain file + # name. This also allows us to put libdw and libelf in a subdir of lib. + PERFPARSER_ELFUTILS_INSTALLDIR = $$QTC_PREFIX/lib/elfutils + PERFPARSER_ELFUTILS_BACKENDS_INSTALLDIR = $$QTC_PREFIX/lib/elfutils + } + + cache(PERFPARSER_APP_DESTDIR) + cache(PERFPARSER_APP_INSTALLDIR) + cache(PERFPARSER_ELFUTILS_INSTALLDIR) + cache(PERFPARSER_ELFUTILS_BACKENDS_INSTALLDIR) +} + +OTHER_FILES += tools.qbs diff --git a/src/tools/tools.qbs b/src/tools/tools.qbs index b3f27424e63..1de2bfb3c5c 100644 --- a/src/tools/tools.qbs +++ b/src/tools/tools.qbs @@ -17,4 +17,12 @@ Project { "iostool/iostool.qbs", "winrtdebughelper/winrtdebughelper.qbs" ].concat(project.additionalTools) + + Project { + name: "PerfParser Tool" + references: [ + "perfparser/perfparser.qbs" + ] + condition: File.exists(project.ide_source_tree + "/src/tools/perfparser/perfparser.qbs") + } }