Skip to content

Commit 3164452

Browse files
committed
add check for compiler plugin
1 parent 87ed06f commit 3164452

2 files changed

Lines changed: 13 additions & 5 deletions

File tree

scorep/helper.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,17 @@ def get_scorep_version():
4444
return version
4545

4646

47-
def get_scorep_link_mode():
47+
def get_scorep_config(config_line=None):
4848
(return_code, std_out, std_err) = call(["scorep-info", "config-summary"])
4949
if (return_code != 0):
5050
raise RuntimeError("Cannot call Score-P, reason {}".format(std_err))
51-
for line in std_out.split("\n"):
52-
if "Link mode:" in line:
53-
return line
51+
if config_line is None:
52+
return std_out.split("\n")
53+
else:
54+
for line in std_out.split("\n"):
55+
if config_line in line:
56+
return line
57+
return None
5458

5559

5660
def add_to_ld_library_path(path):

setup.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,14 @@
55
raise RuntimeError(
66
"Score-P version less than 5.0, plase use Score-P >= 5.0")
77

8-
link_mode = scorep.helper.get_scorep_link_mode()
8+
link_mode = scorep.helper.get_scorep_config("Link mode:")
99
if not ("shared=yes" in link_mode):
1010
raise RuntimeError(
1111
"Score-P not build with \"--enable-shared\". Link mode is:\n{}".format(link_mode))
12+
gcc_plugin = scorep.helper.get_scorep_config("GCC plug-in support:")
13+
if gcc_plugin is not None and not ("yes" in link_mode):
14+
raise RuntimeError(
15+
"Score-P not build with GCC Compiler Plugin. GCC plug-in support is:\n{}".format(gcc_plugin))
1216

1317

1418
cmodules = []

0 commit comments

Comments
 (0)