Merge branch '7.8'
[mesa.git] / scons / gallium.py
index 15aa94448c7bb6501737b8b80bae19c0e6198481..dd7275460dae08b595f2db04256c95f3502976ec 100644 (file)
@@ -142,8 +142,6 @@ def generate(env):
     # configuration. See also http://www.scons.org/wiki/AdvancedBuildExample
     build_topdir = 'build'
     build_subdir = env['platform']
-    if env['llvm']:
-        build_subdir += "-llvm"
     if env['machine'] != 'generic':
         build_subdir += '-' + env['machine']
     if env['debug']:
@@ -155,7 +153,9 @@ def generate(env):
     # different scons versions building the same source file
     env['build'] = build_dir
     env.SConsignFile(os.path.join(build_dir, '.sconsign'))
-    env.CacheDir('build/cache')
+    if 'SCONS_CACHE_DIR' in os.environ:
+        print 'scons: Using build cache in %s.' % (os.environ['SCONS_CACHE_DIR'],)
+        env.CacheDir(os.environ['SCONS_CACHE_DIR'])
     env['CONFIGUREDIR'] = os.path.join(build_dir, 'conf')
     env['CONFIGURELOG'] = os.path.join(os.path.abspath(build_dir), 'config.log')
 
@@ -180,8 +180,6 @@ def generate(env):
             # http://msdn.microsoft.com/en-us/library/aa383745.aspx
             ('_WIN32_WINNT', '0x0601'),
             ('WINVER', '0x0601'),
-            # http://msdn2.microsoft.com/en-us/library/6dwk3a1z.aspx,
-            'WIN32_LEAN_AND_MEAN',
         ]
         if msvc and env['toolchain'] != 'winddk':
             cppdefines += [
@@ -471,6 +469,10 @@ def generate(env):
     # Default libs
     env.Append(LIBS = [])
 
+    # Load LLVM
+    if env['llvm']:
+        env.Tool('llvm')
+
     # Custom builders and methods
     env.Tool('custom')
     createInstallMethods(env)