From 358b2ab4ba9d08bc47b59bf39811b6472acbc53a Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Sun, 17 Jan 2016 18:12:08 -0800 Subject: [PATCH] Temporary fix: Clang is the default compiler on Mac OS X. --- lib/spack/spack/compilers/__init__.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/spack/spack/compilers/__init__.py b/lib/spack/spack/compilers/__init__.py index 2a3d67c731..facc9c338b 100644 --- a/lib/spack/spack/compilers/__init__.py +++ b/lib/spack/spack/compilers/__init__.py @@ -27,6 +27,7 @@ """ import imp import os +import platform from llnl.util.lang import memoized, list_modules from llnl.util.filesystem import join_path @@ -47,7 +48,11 @@ _required_instance_vars = ['cc', 'cxx', 'f77', 'fc'] # TODO: customize order in config file -_default_order = ['gcc', 'intel', 'pgi', 'clang', 'xlc'] +if platform.system() == 'Darwin': + _default_order = ['clang', 'gcc', 'intel'] +else: + _default_order = ['gcc', 'intel', 'pgi', 'clang', 'xlc'] + def _auto_compiler_spec(function): def converter(cspec_like, *args, **kwargs):