[Mesa-dev] [PATCH] fixup! i965: Move the back-end compiler to src/intel/compiler

Tapani Pälli tapani.palli at intel.com
Fri Mar 3 11:21:44 UTC 2017



On 03/02/2017 03:41 PM, Emil Velikov wrote:
> Cc: Mauro Rossi <issor.oruam at gmail.com>
> Cc: Tapani Pälli <tapani.palli at intel.com>
> Cc: Jason Ekstrand <jason.ekstrand at intel.com>
> ---
> All, here is a 5min attempt to fix the Android build. Tapani, Mauro do
> give it a test since I've done an educated guess here.
>
> Pull Jason's branch and apply on top.
> https://cgit.freedesktop.org/~jekstrand/mesa/log/?h=wip/move-compiler

when compiling blorp and isl it says:

fatal error: 'brw_compiler.h' file not found

this can be fixed by putting 'src/intel/compiler' include path for blorp 
and isl libraries:

https://github.com/tpalli/external-mesa/commit/4ffef80a45bd93731b2d2af0cb532687f11ae8d3

but when linking i965_dri library then there is quite a big explosion of 
missing symbols, I can take a look at this but a bit later.


> ---
>  .../Android.gen.mk => intel/Android.compiler.mk}   | 34 ++++++++++++++++++----
>  src/intel/Android.mk                               |  1 +
>  src/mesa/drivers/dri/i965/Android.mk               | 30 ++-----------------
>  3 files changed, 31 insertions(+), 34 deletions(-)
>  rename src/{mesa/drivers/dri/i965/Android.gen.mk => intel/Android.compiler.mk} (64%)
>
> diff --git a/src/mesa/drivers/dri/i965/Android.gen.mk b/src/intel/Android.compiler.mk
> similarity index 64%
> rename from src/mesa/drivers/dri/i965/Android.gen.mk
> rename to src/intel/Android.compiler.mk
> index c2b8dae339..2d4ba91396 100644
> --- a/src/mesa/drivers/dri/i965/Android.gen.mk
> +++ b/src/intel/Android.compiler.mk
> @@ -1,4 +1,7 @@
>  #
> +# Copyright (C) 2011 Intel Corporation
> +# Copyright (C) 2010-2011 Chia-I Wu <olvaffe at gmail.com>
> +# Copyright (C) 2010-2011 LunarG
>  # Copyright (C) 2016 Linaro, Ltd., Rob Herring <robh at kernel.org>
>  #
>  # Permission is hereby granted, free of charge, to any person obtaining a
> @@ -20,21 +23,40 @@
>  # DEALINGS IN THE SOFTWARE.
>  #
>
> -ifeq ($(LOCAL_MODULE_CLASS),)
> -LOCAL_MODULE_CLASS := SHARED_LIBRARIES
> -endif
> +# ---------------------------------------
> +# Build libmesa_intel_compiler
> +# ---------------------------------------
> +
> +include $(CLEAR_VARS)
> +
> +LOCAL_MODULE := libmesa_intel_compiler
> +LOCAL_MODULE_CLASS := STATIC_LIBRARIES
> +
> +LOCAL_SRC_FILES := \
> +	$(COMPILER_FILES)
> +
> +LOCAL_C_INCLUDES := \
> +	$(MESA_TOP)/src/intel \
> +	$(MESA_TOP)/src/compiler/nir \
> +	$(call generated-sources-dir-for,STATIC_LIBRARIES,libmesa_nir,,)/nir
> +
> +LOCAL_SHARED_LIBRARIES := \
> +	libdrm_intel
>
>  brw_nir_trig_workarounds_deps := \
> -	$(LOCAL_PATH)/brw_nir_trig_workarounds.py \
> +	$(LOCAL_PATH)/compiler/brw_nir_trig_workarounds.py \
>  	$(MESA_TOP)/src/compiler/nir/nir_algebraic.py
>
>  intermediates := $(call local-generated-sources-dir)
>
> -$(intermediates)/brw_nir_trig_workarounds.c: $(brw_nir_trig_workarounds_deps)
> +$(intermediates)/compiler/brw_nir_trig_workarounds.c: $(brw_nir_trig_workarounds_deps)
>  	@mkdir -p $(dir $@)
>  	$(hide) PYTHONPATH=$(MESA_TOP)/src/compiler/nir $(MESA_PYTHON2) $< > $@
>
>  LOCAL_STATIC_LIBRARIES = libmesa_genxml
>
>  LOCAL_GENERATED_SOURCES += $(addprefix $(intermediates)/, \
> -	$(i965_compiler_GENERATED_FILES))
> +	$(COMPILER_GENERATED_FILES))
> +
> +include $(MESA_COMMON_MK)
> +include $(BUILD_STATIC_LIBRARY)
> diff --git a/src/intel/Android.mk b/src/intel/Android.mk
> index 7cb2bb9f8d..db6c770f35 100644
> --- a/src/intel/Android.mk
> +++ b/src/intel/Android.mk
> @@ -27,6 +27,7 @@ include $(LOCAL_PATH)/Makefile.sources
>
>  include $(LOCAL_PATH)/Android.blorp.mk
>  include $(LOCAL_PATH)/Android.common.mk
> +include $(LOCAL_PATH)/Android.compiler.mk
>  include $(LOCAL_PATH)/Android.genxml.mk
>  include $(LOCAL_PATH)/Android.isl.mk
>  include $(LOCAL_PATH)/Android.vulkan.mk
> diff --git a/src/mesa/drivers/dri/i965/Android.mk b/src/mesa/drivers/dri/i965/Android.mk
> index 7dea3c2507..708851c866 100644
> --- a/src/mesa/drivers/dri/i965/Android.mk
> +++ b/src/mesa/drivers/dri/i965/Android.mk
> @@ -152,32 +152,6 @@ include $(MESA_COMMON_MK)
>  include $(BUILD_STATIC_LIBRARY)
>
>  # ---------------------------------------
> -# Build libmesa_i965_compiler
> -# ---------------------------------------
> -
> -include $(CLEAR_VARS)
> -
> -LOCAL_MODULE := libmesa_i965_compiler
> -LOCAL_MODULE_CLASS := STATIC_LIBRARIES
> -
> -LOCAL_SRC_FILES := \
> -	$(i965_compiler_FILES)
> -
> -LOCAL_C_INCLUDES := \
> -	$(MESA_DRI_C_INCLUDES) \
> -	$(MESA_TOP)/src/intel \
> -	$(MESA_TOP)/src/compiler/nir \
> -	$(call generated-sources-dir-for,STATIC_LIBRARIES,libmesa_nir,,)/nir \
> -	$(call generated-sources-dir-for,STATIC_LIBRARIES,libmesa_glsl,,)/glsl
> -
> -LOCAL_SHARED_LIBRARIES := \
> -	libdrm_intel
> -
> -include $(LOCAL_PATH)/Android.gen.mk
> -include $(MESA_COMMON_MK)
> -include $(BUILD_STATIC_LIBRARY)
> -
> -# ---------------------------------------
>  # Build i965_dri
>  # ---------------------------------------
>
> @@ -209,9 +183,9 @@ LOCAL_WHOLE_STATIC_LIBRARIES := \
>  	$(MESA_DRI_WHOLE_STATIC_LIBRARIES) \
>  	$(I965_PERGEN_LIBS) \
>  	libmesa_intel_common \
> -	libmesa_blorp \
>  	libmesa_isl \
> -	libmesa_i965_compiler
> +	libmesa_blorp \
> +	libmesa_intel_compiler
>
>  LOCAL_SHARED_LIBRARIES := \
>  	$(MESA_DRI_SHARED_LIBRARIES) \
>


More information about the mesa-dev mailing list