summaryrefslogtreecommitdiffstats
path: root/build/mixxx.py
diff options
context:
space:
mode:
authorRaphael Graf <r@undefined.ch>2019-06-02 22:55:40 +0200
committerRaphael Graf <r@undefined.ch>2019-06-03 15:21:14 +0200
commit100227c96cd33dd1233a2969b3ff94590c53c395 (patch)
tree488b3e4b485adc6f480d6e02dc8cca612c177938 /build/mixxx.py
parenta4db708c987084a6c990125232eabdff35fdba51 (diff)
Improve compiler detection
Diffstat (limited to 'build/mixxx.py')
-rw-r--r--build/mixxx.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/build/mixxx.py b/build/mixxx.py
index 6c966f7524..3b0829a3e5 100644
--- a/build/mixxx.py
+++ b/build/mixxx.py
@@ -208,13 +208,15 @@ class MixxxBuild(object):
self.read_environment_variables()
# Now that environment variables have been read, we can detect the compiler.
- self.compiler_is_gcc = 'gcc' in self.env['CC']
- self.compiler_is_clang = 'clang' in self.env['CC']
+ import subprocess
+ process = subprocess.Popen([self.env['CC'], '--version'], stdout=subprocess.PIPE)
+ (stdout, stderr) = process.communicate()
+ self.compiler_is_gcc = 'gcc' in stdout.lower()
+ self.compiler_is_clang = 'clang' in stdout.lower()
# Determine the major compiler version (only GCC)
if self.compiler_is_gcc:
self.gcc_major_version = None
- import subprocess
process = subprocess.Popen([self.env['CC'], '-dumpversion'], stdout=subprocess.PIPE)
(stdout, stderr) = process.communicate()
gcc_version = stdout