scons: We have C++ in several libraries, so always link with the C++ compiler
authorJosé Fonseca <jfonseca@vmware.com>
Sun, 30 Jan 2011 11:17:07 +0000 (11:17 +0000)
committerJosé Fonseca <jfonseca@vmware.com>
Sun, 30 Jan 2011 11:19:44 +0000 (11:19 +0000)
Prevents missing symbols in libGL.so when LLVM is disabled.

scons/gallium.py
scons/llvm.py

index 75e9b9e7fc302fcbe9a1dc8635381fb9c9d8444a..df060f01a3c696cf165a27a339328ba69659de7b 100644 (file)
@@ -551,6 +551,10 @@ def generate(env):
     env.Append(LINKFLAGS = linkflags)
     env.Append(SHLINKFLAGS = shlinkflags)
 
+    # We have C++ in several libraries, so always link with the C++ compiler
+    if env['gcc']:
+        env['LINK'] = env['CXX']
+
     # Default libs
     env.Append(LIBS = [])
 
index 1b033acb1b3f50d848de1fc694da9e2cdb903719..3fef9e0900d59b2cd57a719cbd5d69aa0571683c 100644 (file)
@@ -147,8 +147,6 @@ def generate(env):
         except OSError:
             print 'scons: llvm-config version %s failed' % llvm_version
             return
-        else:
-            env['LINK'] = env['CXX']
 
     assert llvm_version is not None
     env['llvm'] = True