xlib: remove MESA_GLX_VISUAL_HACK
[mesa.git] / src / mesa / drivers / x11 / SConscript
index 984e6cef4e8001b01938844c9b2c1c4687eaa5a4..59c8df4b3c235579c0aa559940e9ccd42180afa6 100644 (file)
@@ -3,9 +3,11 @@ Import('*')
 env = env.Clone()
 
 env.Append(CPPPATH = [
+    '#/src',
     '#/src/mapi',
     '#/src/mesa',
     '#/src/mesa/main',
+    Dir('../../../mapi'), # src/mapi build path for python-generated GL API files/headers
 ])
 
 env.Append(CPPDEFINES = ['USE_XSHM'])
@@ -15,6 +17,8 @@ env.Prepend(LIBPATH = env['X11_LIBPATH'])
 
 env.Prepend(LIBS = [
     glapi,
+    mesautil,
+    compiler,
     glsl,
     mesa,
 ])
@@ -30,8 +34,13 @@ sources = [
        'xm_tri.c',
 ]
 
-# The sources depend on the python-generated GL API files/headers.
-env.Depends(sources, glapi_headers)
+if env['platform'] != 'darwin':
+    # Disallow undefined symbols, except with Address Sanitizer, since libasan
+    # is not linked on shared libs, as it should be LD_PRELOAD'ed instead
+    if not env['asan']:
+        env.Append(SHLINKFLAGS = [
+            '-Wl,-z,defs',
+        ])
 
 # libGL.so.1.6
 libgl_1_6 = env.SharedLibrary(