Skip to content

Commit e43acc7

Browse files
authored
Merge pull request #7502 from bradcray/prgenv-cray-always-system-gmp
Hardcode CHPL_GMP to 'system' when using cray-prgenv-cray [reviewed by @ronawho. OK'd be @awallace-cray ] Rationale: We're getting silent test failures when building our bundled copy of GMP in that mode.
2 parents 3082939 + ce439bf commit e43acc7

File tree

1 file changed

+17
-13
lines changed

1 file changed

+17
-13
lines changed

Diff for: util/chplenv/chpl_gmp.py

+17-13
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,25 @@
1414
def get():
1515
gmp_val = overrides.get('CHPL_GMP')
1616
if not gmp_val:
17-
target_platform = chpl_platform.get('target')
18-
19-
# Detect if gmp has been built for this configuration.
20-
third_party = get_chpl_third_party()
21-
uniq_cfg_path = chpl_3p_gmp_configs.get_uniq_cfg_path()
22-
gmp_subdir = os.path.join(third_party, 'gmp', 'install', uniq_cfg_path)
23-
24-
if os.path.exists(os.path.join(gmp_subdir, 'include', 'gmp.h')):
25-
gmp_val = 'gmp'
26-
elif target_platform.startswith('cray-x'):
27-
gmp_val = 'system'
28-
elif target_platform == 'aarch64':
17+
target_compiler = chpl_compiler.get('target')
18+
if target_compiler == 'cray-prgenv-cray':
2919
gmp_val = 'system'
3020
else:
31-
gmp_val = 'none'
21+
target_platform = chpl_platform.get('target')
22+
23+
# Detect if gmp has been built for this configuration.
24+
third_party = get_chpl_third_party()
25+
uniq_cfg_path = chpl_3p_gmp_configs.get_uniq_cfg_path()
26+
gmp_subdir = os.path.join(third_party, 'gmp', 'install', uniq_cfg_path)
27+
28+
if os.path.exists(os.path.join(gmp_subdir, 'include', 'gmp.h')):
29+
gmp_val = 'gmp'
30+
elif target_platform.startswith('cray-x'):
31+
gmp_val = 'system'
32+
elif target_platform == 'aarch64':
33+
gmp_val = 'system'
34+
else:
35+
gmp_val = 'none'
3236
return gmp_val
3337

3438

0 commit comments

Comments
 (0)