Skip to content

Commit

Permalink
Merge pull request #7502 from bradcray/prgenv-cray-always-system-gmp
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
bradcray authored Sep 28, 2017
2 parents 3082939 + ce439bf commit e43acc7
Showing 1 changed file with 17 additions and 13 deletions.
30 changes: 17 additions & 13 deletions util/chplenv/chpl_gmp.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,25 @@
def get():
gmp_val = overrides.get('CHPL_GMP')
if not gmp_val:
target_platform = chpl_platform.get('target')

# Detect if gmp has been built for this configuration.
third_party = get_chpl_third_party()
uniq_cfg_path = chpl_3p_gmp_configs.get_uniq_cfg_path()
gmp_subdir = os.path.join(third_party, 'gmp', 'install', uniq_cfg_path)

if os.path.exists(os.path.join(gmp_subdir, 'include', 'gmp.h')):
gmp_val = 'gmp'
elif target_platform.startswith('cray-x'):
gmp_val = 'system'
elif target_platform == 'aarch64':
target_compiler = chpl_compiler.get('target')
if target_compiler == 'cray-prgenv-cray':
gmp_val = 'system'
else:
gmp_val = 'none'
target_platform = chpl_platform.get('target')

# Detect if gmp has been built for this configuration.
third_party = get_chpl_third_party()
uniq_cfg_path = chpl_3p_gmp_configs.get_uniq_cfg_path()
gmp_subdir = os.path.join(third_party, 'gmp', 'install', uniq_cfg_path)

if os.path.exists(os.path.join(gmp_subdir, 'include', 'gmp.h')):
gmp_val = 'gmp'
elif target_platform.startswith('cray-x'):
gmp_val = 'system'
elif target_platform == 'aarch64':
gmp_val = 'system'
else:
gmp_val = 'none'
return gmp_val


Expand Down

0 comments on commit e43acc7

Please sign in to comment.