summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDylan Baker <[email protected]>2018-04-24 13:48:25 -0700
committerDylan Baker <[email protected]>2019-10-18 13:02:58 -0700
commitb962c7c9713700ca02b698efb1dfdd28516ce580 (patch)
tree07f7fe9f97aca43ec0fca525fe21a1e7665a9740 /src
parentdbd554ba05d6fd5d434b2bc08f656cd62677e77b (diff)
meson: Add support for wrapping llvm
For building on Windows (when not using cygwin), users may want to use a binary wrap of LLVM, this provides a fallback to the LLVM dependency which may be used in this case Reviewed-by: Adam Jackson <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/swr/rasterizer/jitter/meson.build16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/gallium/drivers/swr/rasterizer/jitter/meson.build b/src/gallium/drivers/swr/rasterizer/jitter/meson.build
index aced4a1b735..c52f285cd37 100644
--- a/src/gallium/drivers/swr/rasterizer/jitter/meson.build
+++ b/src/gallium/drivers/swr/rasterizer/jitter/meson.build
@@ -18,15 +18,21 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
+if dep_llvm.type_name() == 'internal'
+ _irbuilder_h = subproject('llvm').get_variable('irbuilder_h')
+else
+ if meson.version().version_compare('>=0.51')
+ _llvm_includedir = dep_llvm.get_variable(configtool : 'includedir', cmake : 'LLVM_INCLUDE_DIR')
+ else
+ _llvm_includedir = dep_llvm.get_configtool_variable('includedir')
+ endif
+ _irbuilder_h = join_paths(_llvm_includedir, 'llvm', 'IR', 'IRBuilder.h')
+endif
gen_builder_hpp = custom_target(
'gen_builder.hpp',
input : [
- swr_gen_llvm_ir_macros_py,
- join_paths(
- dep_llvm.get_configtool_variable('includedir'), 'llvm', 'IR',
- 'IRBuilder.h'
- )
+ swr_gen_llvm_ir_macros_py, _irbuilder_h,
],
output : 'gen_builder.hpp',
command : [