summaryrefslogtreecommitdiff
path: root/scons
AgeCommit message (Collapse)AuthorFilesLines
2018-08-16scons: Check for mako 0.8.0Dylan Baker1-0/+13
v2: - Use distutils to do the version checking Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107565 Acked-by: Eric Engestrom <eric.engestrom@intel.com> Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2018-08-16scons: Require python 2.7Dylan Baker1-4/+0
less than 2.7 is not supported. v2: - Remove check for python >= 2.0, since we've already enforced 2.7 Reviewed-by: Eric Engestrom <eric.engestrom@intel.com> Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2018-06-18mesa: Unconditionally enable floating-point texturesTimothy Arceri1-4/+0
ARB_texture_float references US Patent #6,650,327 [1] which has a filing date of June 16 1998. According to [2], patents filed after 1995 expire 20 years from the filing date, giving an expiration of June 17 2018. [1] https://www.google.com/patents/US6650327 [2] https://en.wikipedia.org/wiki/Term_of_patent_in_the_United_States Reviewed-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2018-06-02scons: Fix MinGW cross compilation with LLVM 5.0.Jose Fonseca1-1/+8
LLVM 5.0 requires additional Win32 libraries, and MinGW with pthreads. Reviewed-by: Roland Scheidegger <sroland@vmware.com>
2018-03-23meson/configure: detect endian.h instead of trying to guess when it's availableEric Engestrom1-0/+3
Cc: Maxin B. John <maxin.john@gmail.com> Cc: Khem Raj <raj.khem@gmail.com> Cc: Rob Herring <robh@kernel.org> Suggested-by: Jon Turney <jon.turney@dronecode.org.uk> Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Dylan Baker <dylan@pnwbakers.com> Cc: <mesa-stable@lists.freedesktop.org>
2018-03-19scons: need to split CC or things might failJose Fonseca1-1/+3
We've seen this fail internally. Reviewed-by: Roland Scheidegger <sroland@vmware.com>
2017-11-16threads,configure.ac,meson.build: define and use HAVE_TIMESPEC_GETNicolai Hähnle1-0/+3
Tested with Travis and Appveyor. v2: add HAVE_TIMESPEC_GET for non-Windows Scons builds v3: use check_functions in Scons (Eric) Cc: Rob Herring <robh@kernel.org> Cc: Alexander von Gluck IV <kallisti5@unixzen.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103674 Fixes: f1a364878431 ("threads: update for late C11 changes") Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com> Reviewed-by: Dylan Baker <dylan@pnwbakers.com> Reviewed-by: Jon Turney <jon.turney@dronecode.org.uk> (v2)
2017-09-25scons: use python3-compatible exceptionsEric Engestrom3-4/+4
These changes were generated using python's `2to3` tool. Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
2017-09-25scons: use python3-compatible listsEric Engestrom1-4/+4
These changes were generated using python's `2to3` tool. Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com> Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2017-09-25scons: use python3-compatible list-key checkEric Engestrom1-5/+5
These changes were generated using python's `2to3` tool. Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
2017-09-25scons: use python3-compatible print()Eric Engestrom2-19/+19
These changes were generated using python's `2to3` tool. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102852 Reported-by: Alex Granni <liviuprodea@yahoo.com> Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com> Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2017-09-19Scons: Add LLVM 5.0 supportAlexandru-Liviu Prodea1-1/+20
1 new required library - LLVMBinaryFormat Cc: "17.2" <mesa-stable@lists.freedesktop.org> Bugzilla: https://bugs.freedesktop.org=/show_bug.cgi?id=3D102318 Signed-off-by: Alexandru-Liviu Prodea <liviuprodea@yahoo.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2017-09-03util: improve compiler guardEric Engestrom1-0/+16
Glibc 2.26 has dropped xlocale.h, but the functions needed (strtod_l() and strdof_l()) can be found in stdlib.h. Improve the detection method to allow newer builds to still make use of the locale-setting. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102454 Cc: Laurent Carlier <lordheavym@gmail.com> Cc: Emil Velikov <emil.l.velikov@gmail.com> Cc: Rob Herring <robh@kernel.org> Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com> Reviewed-by: Laurent Carlier <lordheavym@gmail.com> Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2017-07-14scons: split out check_header() helperEric Engestrom1-3/+12
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
2017-07-06scons: Check for xlocale.h before defining HAVE_XLOCALE_H.Vinson Lee1-1/+3
Don't assume the header is present on some platforms - use the more robust CheckHeader() instead. glibc 2.26 removed xlocale.h. https://sourceware.org/glibc/wiki/Release/2.26#Removal_of_.27xlocale.h.27 Fix this build error with glibc 2.26. Compiling src/util/strtod.c ... src/util/strtod.c:32:10: fatal error: xlocale.h: No such file or directory #include <xlocale.h> ^~~~~~~~~~~ Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101657 Signed-off-by: Vinson Lee <vlee@freedesktop.org> Cc: mesa-stable@lists.freedesktop.org Reviewed-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com> Tested-by: Eric Engestrom <eric.engestrom@imgtec.com>
2017-06-30scons: allow .inl file extensionTim Rowley1-1/+1
Intended for header files which are not meant to be included directly. Reviewed-by: Bruce Cherniak <bruce.cherniak at intel.com>
2017-05-04scons: update for LLVM 4.0Ben Boeckel1-2/+20
LLVMDemangle, LLVMGlobalISel, and LLVMDebugInfoMSF are new. Also update the comment to add irreader to the list of components. CC: <mesa-stable@lists.freedesktop.org> Reviewed-by: Chuck Atkins <chuck.atkins@kitware.com> Signed-off-by: Ben Boeckel <ben.boeckel@kitware.com> Acked-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2017-03-15autoconf/scons: bump libdrm to 2.4.75Emil Velikov1-1/+1
We'll be using the drmGetDevice[s]2 API in src/loader with next patch. v2: Rebase. Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> (v1) Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com> (v1) Tested-by: Mike Lothian <mike@fireburn.co.uk>
2017-02-13scons: check for libXdamage 1.1 or laterEmil Velikov1-1/+1
Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Matt Turner <mattst88@gmail.com>
2017-02-13scons: add missing dri2proto requirementEmil Velikov1-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 <emil.velikov@collabora.com> Reviewed-by: Matt Turner <mattst88@gmail.com>
2017-01-27scons: always set __STDC_*_MACROS for C++ sourcesEmil Velikov2-3/+2
Analogous to previous commit - just set the lot once throughout. Cc: Jose Fonseca <jfonseca@vmware.com> Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com> Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2017-01-18mesa: make use of HAVE_FUNC_ATTRIBUTE_ALIAS macroEmil Velikov1-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 <ajax@redhat.com> Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
2016-11-24scons: Recognize LLVM_CONFIG environment variable.Vinson Lee1-8/+9
Signed-off-by: Vinson Lee <vlee@freedesktop.org> Reviewed-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2016-11-21scons: add llvm 3.9 support.George Kyriazis1-2/+19
v2: reworded commit message Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2016-11-21scons: ignore .hpp files in parse_source_list()George Kyriazis1-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 <emil.velikov@collabora.com>
2016-10-25scons: Require libdrm >= 2.4.66 for DRM.Vinson Lee1-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 <vlee@freedesktop.org> Reviewed-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Vedran Miletić <vedran@miletic.net>
2016-10-18scons: remove all libudev referencesEmil Velikov1-1/+0
Analogous to previous automake/autoconf commit. Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Axel Davy <axel.davy@ens.fr> Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2016-10-14scons: Fix the Python dependency scanner.Jose Fonseca1-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.
2016-08-26svga: add opt to the list of valid build typesCharmaine Lee1-3/+5
For opt build, add VMX86_STATS to the list of cpp defines. Reviewed-by: Brian Paul <brianp@vmware.com>
2016-05-25scons: support 2.5.0Giuseppe Bilotta1-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 <giuseppe.bilotta@gmail.com> Cc: mesa-stable@lists.freedesktop.org Acked-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Brian Paul <brianp@vmware.com>
2016-05-09scons: Improve Python module dependency discovery.Jose Fonseca1-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 <brianp@vmware.com>
2016-04-26scons: Support Clang on Windows.Jose Fonseca1-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 <sroland@vmware.com> Reviewed-by: Brian Paul <brianp@vmware.com>
2016-04-26scons: Move fallback HAVE_* definitions to headers.Jose Fonseca1-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 <sroland@vmware.com> Reviewed-by: Brian Paul <brianp@vmware.com>
2016-04-19scons: Show the unit test full path.Jose Fonseca1-1/+1
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
2016-04-14scons: Add a "check" target to run all unit tests.Jose Fonseca1-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 <sroland@vmware.com>
2016-04-13scons: Allow building with Address Sanitizer.Jose Fonseca1-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 <sroland@vmware.com>
2016-02-11scons: Eliminate MSVC2008 compatibility.Jose Fonseca1-16/+0
Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Roland Scheidegger <sroland@vmware.com>
2016-01-11configure.ac: always define __STDC_CONSTANT_MACROSOded Gabbay1-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 <oded.gabbay@gmail.com> Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2015-12-08scons: support for LLVM 3.7.Olivier Pena1-1/+13
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2015-08-15scons: Always define __STDC_LIMIT_MACROS.Vinson Lee1-0/+1
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91591 Signed-off-by: Vinson Lee <vlee@freedesktop.org> Reviewed-by: Roland Scheidegger <sroland@vmware.com>
2015-05-29gallivm: Use the LLVM's C disassembly interface.Jose Fonseca1-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 <sroland@vmware.com>
2015-04-27scons: Support LLVM 3.5 and 3.6 on windows.Olivier Pena1-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 <jfonseca@vmware.com>
2015-03-25scons: Disable MSVC warnings about inconsistent function annotation.Jose Fonseca1-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 <brianp@vmware.com>
2015-03-22scons: Silence conversion from 'size_t' to 'type', possible loss of data on ↵Jose Fonseca1-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 <brianp@vmware.com>
2015-03-22scons: Ensure inttypes.h is always pre-included on MSVC.Jose Fonseca1-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 <brianp@vmware.com>
2015-03-22scons: Silence MSVC C4351 warning.Jose Fonseca1-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 <brianp@vmware.com>
2015-03-22scons: Match some of LLVM warning options.Jose Fonseca1-0/+5
Reviewed-by: Brian Paul <brianp@vmware.com>
2015-03-22scons: Prefer winflexbison, and use --wincompat when available.Jose Fonseca1-7/+33
This avoids MSVC the warning warning C4013: 'isatty' undefined; assuming extern returning int with certain versions of flex. Reviewed-by: Brian Paul <brianp@vmware.com> v2: Add win flex-bison link to docs/install.html.
2015-03-22scons: Define YY_USE_CONST on MSVC.Jose Fonseca1-0/+8
This prevents the MSVC from warning C4090: 'function' : different 'const' qualifiers when compiling flex generated lexers. Reviewed-by: Brian Paul <brianp@vmware.com>
2015-03-22scons: Tell MSVC STL library to not use exceptions.Jose Fonseca1-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 <brianp@vmware.com>