aboutsummaryrefslogtreecommitdiffstats
path: root/scons
Commit message (Collapse)AuthorAgeFilesLines
* scons: check for libXdamage 1.1 or laterEmil Velikov2017-02-131-1/+1
| | | | | Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* scons: add missing dri2proto requirementEmil Velikov2017-02-131-1/+1
| | | | | | | | Noticed while skimming through, although admittedly there's many other dependencies that are not tracked by the scons build. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* scons: always set __STDC_*_MACROS for C++ sourcesEmil Velikov2017-01-272-3/+2
| | | | | | | | | Analogous to previous commit - just set the lot once throughout. Cc: Jose Fonseca <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Jose Fonseca <[email protected]>
* mesa: make use of HAVE_FUNC_ATTRIBUTE_ALIAS macroEmil Velikov2017-01-181-4/+0
| | | | | | | | | | | We must make sure that xserver has an equivalent one-line change to its configure.ac as the glx/glapi headers get copied over. Then again, xserver does _not_ seem to set HAVE_ALIAS to begin with so one might want to look into that first. Cc: Adam Jackson <[email protected]> Signed-off-by: Emil Velikov <[email protected]>
* scons: Recognize LLVM_CONFIG environment variable.Vinson Lee2016-11-241-8/+9
| | | | | | Signed-off-by: Vinson Lee <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Jose Fonseca <[email protected]>
* scons: add llvm 3.9 support.George Kyriazis2016-11-211-2/+19
| | | | | | v2: reworded commit message Reviewed-by: Emil Velikov <[email protected]>
* scons: ignore .hpp files in parse_source_list()George Kyriazis2016-11-211-1/+1
| | | | | | | Drivers that contain C++ .hpp files need to ignore them too, along with .h files, when building source file lists. Reviewed-by: Emil Velikov <[email protected]>
* scons: Require libdrm >= 2.4.66 for DRM.Vinson Lee2016-10-251-1/+1
| | | | | | | | | | | | | | | | | configure.ac already requires 2.4.66. Fix SCons build. drmDevicePtr is not available until libdrm 2.4.65. Compiling src/loader/loader.c ... src/loader/loader.c:111:40: error: unknown type name ‘drmDevicePtr’ static char *drm_construct_id_path_tag(drmDevicePtr device) ^ Fixes: 4a183f4d06f8 ("scons: loader: use libdrm when available") Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98421 Signed-off-by: Vinson Lee <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Vedran Miletić <[email protected]>
* scons: remove all libudev referencesEmil Velikov2016-10-181-1/+0
| | | | | | | | Analogous to previous automake/autoconf commit. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Axel Davy <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* scons: Fix the Python dependency scanner.Jose Fonseca2016-10-141-2/+8
| | | | | | | | | | | | | | modulefinder wasn't searching for dependencies in the script dir. It's not capable of detecting the sys.path manipulations scripts do internally neither. This change fixes the first issue, and hacks around the second. Honestly, I've come to the conclusion that automatic Python dependency it will always be too brittle. I think we should start manually typing the dependencies like we do in automake. At very least it will enable any person to eyeball and spot/fix missing dependencies, without dig into SCons internals.
* svga: add opt to the list of valid build typesCharmaine Lee2016-08-261-3/+5
| | | | | | For opt build, add VMX86_STATS to the list of cpp defines. Reviewed-by: Brian Paul <[email protected]>
* scons: support 2.5.0Giuseppe Bilotta2016-05-251-1/+8
| | | | | | | | | | | | | | The get_implicit_deps changed in SCons 2.5, expecting a callable rather than a path as third argument. Detect the SCons versions and set the argument appropriately to support both 2.5 and earlier versions. This closes #95211. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=95211 Signed-off-by: Giuseppe Bilotta <[email protected]> Cc: [email protected] Acked-by: Emil Velikov <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* scons: Improve Python module dependency discovery.Jose Fonseca2016-05-091-18/+9
| | | | | | | | | | Several NIR scripts were using `from ... import ...` syntax, which wasn't supported. Using Python standard libary's modulefinder solves the problem with less effort and hacks. Reviewed-by: Brian Paul <[email protected]>
* scons: Support Clang on Windows.Jose Fonseca2016-04-261-9/+14
| | | | | | | | | | | | | | | | | - Introduce 'gcc_compat' env flag, for all compilers that define __GNUC__, (which includes Clang when it's not emulating MSVC.) - Clang doesn't support whole program optimization - Disable enumerator value warnings (not sure why Clang warns about them, as my understanding is that MSVC promotes enums to unsigned ints automatically.) This is not enough to build with Clang + AddressSanitizer though. More follow up changes will be required for that. Reviewed-by: Roland Scheidegger <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* scons: Move fallback HAVE_* definitions to headers.Jose Fonseca2016-04-261-43/+5
| | | | | | | | | | | | | | | | | | These were being defined in SCons, but it's not practical: - we actually need to include Gallium headers from external source trees, with completely disjoint build infrastructure, and it's unsustainable to replicate the HAVE_xxx checks or even hard-coded defines across everywhere. - checking compiler version via command line doesn't really work due to Clang essentially being like a cameleon which can fake either GCC or MSVC There's no change for autoconf. Reviewed-by: Roland Scheidegger <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* scons: Show the unit test full path.Jose Fonseca2016-04-191-1/+1
| | | | Reviewed-by: Roland Scheidegger <[email protected]>
* scons: Add a "check" target to run all unit tests.Jose Fonseca2016-04-141-9/+18
| | | | | | | | | Except: - u_cache_test -- too long - translate_test -- unreliable (it's probably testing corner cases that translate module doesn't care about.) Reviewed-by: Roland Scheidegger <[email protected]>
* scons: Allow building with Address Sanitizer.Jose Fonseca2016-04-131-1/+11
| | | | | | | | | | | | | | | | | | | | | | | libasan is never linked to shared objects (which doesn't go well with -z,defs). It must either be linked to the main executable, or (more practically for OpenGL drivers) be pre-loaded via LD_PRELOAD. Otherwise works. I didn't find anything with llvmpipe. I suspect the fact that the JIT compiled code isn't instrumented means there are lots of errors it can't catch. But for non-JIT drivers, the Address/Leak Sanitizers seem like a faster alternative to Valgrind. Usage (Ubuntu 15.10): scons asan=1 libgl-xlib export LD_LIBRARY_PATH=$PWD/build/linux-x86_64-debug/gallium/targets/libgl-xlib LD_PRELOAD=libasan.so.2 any-opengl-application Acked-by: Roland Scheidegger <[email protected]>
* scons: Eliminate MSVC2008 compatibility.Jose Fonseca2016-02-111-16/+0
| | | | | Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* configure.ac: always define __STDC_CONSTANT_MACROSOded Gabbay2016-01-111-1/+1
| | | | | | | | | | | | | | | | The ISO C99 standard (7.18.4) specifies that C++ implementations should define UINT64_C only when __STDC_CONSTANT_MACROS is defined. Because we now use UINT64_C in our cpp files (since commit 208bfc493debe0344d0b9cb93975981f14412628), we need to add this define. This also solves compilation errors with GCC 4.8.x on ppc64le machines. v2: add this define to SCons build system Signed-off-by: Oded Gabbay <[email protected]> Reviewed-by: Jose Fonseca <[email protected]>
* scons: support for LLVM 3.7.Olivier Pena2015-12-081-1/+13
| | | | Reviewed-by: Jose Fonseca <[email protected]>
* scons: Always define __STDC_LIMIT_MACROS.Vinson Lee2015-08-151-0/+1
| | | | | | Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91591 Signed-off-by: Vinson Lee <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* gallivm: Use the LLVM's C disassembly interface.Jose Fonseca2015-05-291-1/+3
| | | | | | | | | | | It doesn't do everything we want. In particular it doesn't allow to detect jumps or return opcodes. Currently we detect the x86's RET opcode. Even though it's worse for LLVM 3.3, it's an improvement for LLVM 3.7, which was totally busted. Reviewed-by: Roland Scheidegger <[email protected]>
* scons: Support LLVM 3.5 and 3.6 on windows.Olivier Pena2015-04-271-7/+26
| | | | | | | | llvm/Config/llvm-config.h is parsed instead of llvm/Config/config.h for detecting LLVM version (http://lists.cs.uiuc.edu/pipermail/llvmdev/2014-June/073707.html). Reviewed-by: Jose Fonseca <[email protected]>
* scons: Disable MSVC warnings about inconsistent function annotation.Jose Fonseca2015-03-251-0/+1
| | | | | | | | | Somehow, merely including any of the *intrin.h headers causes dozens of this warnings (when compiling pretty much every source file). MSVC does not always complain the same -- so it's possible we're doing something weird --, but silence these warnings in the meanwhile. Reviewed-by: Brian Paul <[email protected]>
* scons: Silence conversion from 'size_t' to 'type', possible loss of data on ↵Jose Fonseca2015-03-221-0/+1
| | | | | | | | | | MSVC. Most cases seem harmless, though that might not always be the case. Maybe one day we can get gcc to complain about these and fix them throughout the code, but until then let's silence them. Reviewed-by: Brian Paul <[email protected]>
* scons: Ensure inttypes.h is always pre-included on MSVC.Jose Fonseca2015-03-221-0/+7
| | | | | | | | | | | | It's a bit hackish couldn't find another solution. See code comment for details. The warning is useful, so universally disabling doesn't sound a good idea. Fixes warning C4005: 'xxx' : macro redefinition Reviewed-by: Brian Paul <[email protected]>
* scons: Silence MSVC C4351 warning.Jose Fonseca2015-03-221-0/+1
| | | | | | | | It warns about change in MSVC behavior -- array initialisation used to be non-standard, but is standard now, assuming I understand correctly http://en.cppreference.com/w/cpp/language/zero_initialization . Reviewed-by: Brian Paul <[email protected]>
* scons: Match some of LLVM warning options.Jose Fonseca2015-03-221-0/+5
| | | | Reviewed-by: Brian Paul <[email protected]>
* scons: Prefer winflexbison, and use --wincompat when available.Jose Fonseca2015-03-221-7/+33
| | | | | | | | | | | | This avoids MSVC the warning warning C4013: 'isatty' undefined; assuming extern returning int with certain versions of flex. Reviewed-by: Brian Paul <[email protected]> v2: Add win flex-bison link to docs/install.html.
* scons: Define YY_USE_CONST on MSVC.Jose Fonseca2015-03-221-0/+8
| | | | | | | | | | This prevents the MSVC from warning C4090: 'function' : different 'const' qualifiers when compiling flex generated lexers. Reviewed-by: Brian Paul <[email protected]>
* scons: Tell MSVC STL library to not use exceptions.Jose Fonseca2015-03-221-0/+1
| | | | | | | | | | | | MSVC defaults to no exceptions unless /EH option is passed (which we don't), while MSVC's STL defaults to use exceptions unless _HAS_EXCEPTIONS=0 is defined, which we didn't. This fixes warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc Reviewed-by: Brian Paul <[email protected]>
* scons: Silence MSVC warnings about overflows in constant arithmetic.Jose Fonseca2015-03-181-0/+2
| | | | | | | These get triggered even when using the standard C99 INFINITY/NAN constants. Reviewed-by: Brian Paul <[email protected]>
* scons: Disable MSVC signed/unsigned mismatch warnings.José Fonseca2015-03-181-0/+1
| | | | | | | | | | | | | By default gcc ignores the issue, and as result code that mixes signed/unsigned is so widespread through the code base that it ends up being little more than noise, potentially obscuring more pertinent warnings. Maybe one day we enable the corresponding gcc warnings and cleanup, but until then, this change disables them. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* Add macro for unused function attribute.Vinson Lee2015-03-091-0/+1
| | | | | | Suggested-by: Emil Velikov <[email protected]> Signed-off-by: Vinson Lee <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* scons: Update for the fact that we require GCC 4.2Jose Fonseca2015-03-041-15/+10
| | | | Reviewed-by: Brian Paul <[email protected]>
* scons: Use -Werror MSVC compatibility flags per-directory.Jose Fonseca2015-03-041-7/+20
| | | | | | Matching what we already do with autotools builds. Reviewed-by: Brian Paul <[email protected]>
* scons: Define _DEFAULT_SOURCE.Vinson Lee2015-03-031-0/+1
| | | | | | | | | | | Fix GCC cpp warnings with glibc >= 2.19. /usr/include/features.h:148:3: warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp] # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" ^ Signed-off-by: Vinson Lee <[email protected]> Acked-by: Emil Velikov <[email protected]>
* scons: Fix HAVE___* definition.Jose Fonseca2015-03-021-24/+23
| | | | | | These definitions must be moved before `cppdefines` is used to have effect. Trivial.
* scons: Fix Windows builds with LLVM 3.5.Jose Fonseca2015-02-031-2/+14
| | | | LLVMBitReader dependency was introduced, as pointed out by Rob Conde.
* scons: Add X11 include path if X11 is available.Vinson Lee2015-01-221-0/+3
| | | | | | | | | | | | | | Mac OS X XQuartz places X11 headers at /opt/X11/include. This patch fixes this Mac OS X SCons build error. Compiling src/gallium/state_trackers/glx/xlib/glx_api.c ... In file included from src/gallium/state_trackers/glx/xlib/glx_api.c:34: include/GL/glx.h:30:10: fatal error: 'X11/Xlib.h' file not found ^ Signed-off-by: Vinson Lee <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* scons: Generate SSE2 floating-point arithmetic.José Fonseca2014-11-261-2/+2
| | | | | | | | | | | | | | | - SSE2 is available on all x86 processors we care about. - It's recommended by Intel: https://software.intel.com/en-us/blogs/2012/09/26/gcc-x86-performance-hints - And has been the default since MSVC 2012: http://msdn.microsoft.com/en-us/library/7t5yh4fd(v=vs.110).aspx Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* scons: Remove dead code/comments.José Fonseca2014-11-261-4/+1
| | | | | | | | | | | | | - Remove no-op if-clause. - -mstackrealign has been enabled again on MinGW for quite some time and appears to work alright nowadays. - Drop -mmmx option as it is implied my -msse, and we don't use MMX intrinsics anyway. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* scons: Require glproto >= 1.4.13 for X11.Vinson Lee2014-11-161-1/+1
| | | | | | | | | | | GLXBadProfileARB and X_GLXCreateContextAtrribsARB require glproto >= 1.4.13. These symbols were added in commit d5d41112cbccd9301500e8e023be77eb9cb622cd "st/xlib: Generate errors as specified." Signed-off-by: Vinson Lee <[email protected]> Cc: "10.4" <[email protected]> Reviewed-by: José Fonseca <[email protected]>
* configure: check for xlocale.h and strtofChia-I Wu2014-10-301-0/+4
| | | | | | | | With the assumptions that xlocale.h implies newlocale and strtof_l. SCons is updated to define HAVE_XLOCALE_H on linux and darwin. Signed-off-by: Chia-I Wu <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* gallivm,llvmpipe,clover: Bump required LLVM version to 3.3.José Fonseca2014-10-231-14/+2
| | | | | | | | | | | | | | We'll need to update gallivm for the interface changes in LLVM 3.6, and the fewer the number of older LLVM versions we support the less hairy that will be. As consequence HAVE_AVX define can disappear. (Note HAVE_AVX meant whether LLVM version supports AVX or not. Runtime support for AVX is always checked and enforced independently.) Verified llvmpipe builds and runs with with LLVM 3.3, 3.4, and 3.5. Reviewed-by: Roland Scheidegger <[email protected]>
* mesa: Replace a priori knowledge of gcc attributes with configure tests.Matt Turner2014-09-251-0/+6
| | | | | | | | Note that I had to add support for testing the packed attribute to m4/ax_gcc_func_attribute.m4. Reviewed-by: Jason Ekstrand <[email protected]> [C bits] Reviewed-by: Ian Romanick <[email protected]>
* mesa: Replace a priori knowledge of gcc builtins with configure tests.Matt Turner2014-09-251-0/+18
| | | | | | | | | | | | | | Presumbly this will let clang and other compilers use the built-ins as well. Notice two changes specifically: - in _mesa_next_pow_two_64(), always use __builtin_clzll and add a static assertion that this is safe. - in macros.h, remove the clang-specific definition since it should be able to detect __builtin_unreachable in configure. Reviewed-by: Jason Ekstrand <[email protected]> [C bits] Reviewed-by: Ian Romanick <[email protected]>
* scons: add /dynamicbase and /nxcompat to MinGW linkflagsJosé Fonseca2014-09-111-2/+6
| | | | Just like b26503b196d51dc46c815e241343e42ab30e8d66 for MSVC.
* scons: add /dynamicbase and /nxcompat to MSVC linkflagsBrian Paul2014-09-111-0/+2
| | | | | | | This builds the opengl DLLs with address layout space randomization (ASLR) and data execution prevention (DEP) for better security. Reviewed-by: Kurt Daverman <[email protected]>