Android: fix build break from nir/glsl move to compiler/
authorRob Herring <robh@kernel.org>
Wed, 10 Feb 2016 22:02:11 +0000 (16:02 -0600)
committerEmil Velikov <emil.l.velikov@gmail.com>
Mon, 29 Feb 2016 10:51:44 +0000 (10:51 +0000)
Commits a39a8fbbaa12 ("nir: move to compiler/") and eb63640c1d38
("glsl: move to compiler/") broke Android builds. Fix them.

There is also a missing dependency between generated NIR headers and
several libraries. This isn't a new issue, but seems to have been
exposed by the NIR move.

Built with i915, i965, freedreno, r300g, r600g, vc4, and virgl enabled.

Cc: "11.2" <mesa-stable@lists.freedesktop.org>
Cc: Mauro Rossi <issor.oruam@gmail.com>
Signed-off-by: Rob Herring <robh@kernel.org>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
17 files changed:
Android.mk
src/compiler/Android.gen.mk
src/compiler/glsl/Android.gen.mk
src/compiler/glsl/Android.mk
src/gallium/auxiliary/Android.mk
src/gallium/drivers/freedreno/Android.mk
src/gallium/drivers/r300/Android.mk
src/gallium/drivers/vc4/Android.mk
src/gallium/targets/dri/Android.mk
src/mesa/Android.libmesa_dricore.mk
src/mesa/Android.libmesa_glsl_utils.mk
src/mesa/Android.libmesa_st_mesa.mk
src/mesa/Android.mesa_gen_matypes.mk
src/mesa/drivers/dri/Android.mk
src/mesa/drivers/dri/i915/Android.mk
src/mesa/drivers/dri/i965/Android.mk
src/mesa/program/Android.mk

index 908078a02cece1e75b0a3d4194e1c091c0b71891..2c56b73dffcd0575ccb1cc8da36f90e75bae8279 100644 (file)
@@ -87,7 +87,7 @@ SUBDIRS := \
        src/loader \
        src/mapi \
        src/compiler \
-       src/glsl \
+       src/compiler/glsl \
        src/mesa \
        src/util \
        src/egl \
index fcd5f94d459499439c63d7be3638b6aaac851f1d..96fc750ec646e85b08d34a99f74bcd89d424bff7 100644 (file)
@@ -42,6 +42,10 @@ LOCAL_EXPORT_C_INCLUDE_DIRS += \
 LOCAL_GENERATED_SOURCES += $(addprefix $(intermediates)/, \
        $(NIR_GENERATED_FILES))
 
+# Modules using libmesa_nir must set LOCAL_GENERATED_SOURCES to this
+MESA_GEN_NIR_H := $(addprefix $(call local-generated-sources-dir)/, \
+       nir/nir_opcodes.h \
+       nir/nir_builder_opcodes.h)
 
 nir_builder_opcodes_gen := $(LOCAL_PATH)/nir/nir_builder_opcodes_h.py
 nir_builder_opcodes_deps := \
index c5741b40bc5307a842dd789c6cc6c0581536ca31..c0902b27f32b246ae036a50384040f9e42143752 100644 (file)
@@ -33,7 +33,7 @@ LOCAL_SRC_FILES := $(LOCAL_SRC_FILES)
 
 LOCAL_C_INCLUDES += \
        $(intermediates)/glcpp \
-       $(MESA_TOP)/src/glsl/glcpp \
+       $(LOCAL_PATH)/glcpp \
 
 LOCAL_GENERATED_SOURCES += $(addprefix $(intermediates)/, \
        $(LIBGLCPP_GENERATED_FILES) \
index 9cbb9a339a16c18fc3e336062db88fe3cce0dc2a..f5d96b300f0c9a2abc12834bd4a3295bbbe75374 100644 (file)
@@ -36,7 +36,6 @@ include $(CLEAR_VARS)
 LOCAL_SRC_FILES := \
        $(LIBGLCPP_FILES) \
        $(LIBGLSL_FILES) \
-       $(NIR_FILES)
 
 LOCAL_C_INCLUDES := \
        $(MESA_TOP)/src/mapi \
@@ -67,7 +66,7 @@ LOCAL_C_INCLUDES := \
        $(MESA_TOP)/src/gallium/include \
        $(MESA_TOP)/src/gallium/auxiliary
 
-LOCAL_STATIC_LIBRARIES := libmesa_glsl libmesa_glsl_utils libmesa_util
+LOCAL_STATIC_LIBRARIES := libmesa_glsl libmesa_glsl_utils libmesa_util libmesa_compiler
 
 LOCAL_MODULE_TAGS := eng
 LOCAL_MODULE := glsl_compiler
index 86430eb6a21dd1b3ff67d375dc1a09e9d15dccfc..f5b5a0ccccefea4766f05c4db67a41d15e3f11b8 100644 (file)
@@ -44,9 +44,9 @@ LOCAL_SRC_FILES += \
 LOCAL_CPPFLAGS := -std=c++11
 endif
 
-# We need libmesa_glsl to get NIR's generated include directories.
+# We need libmesa_nir to get NIR's generated include directories.
 LOCAL_MODULE := libmesa_gallium
-LOCAL_STATIC_LIBRARIES += libmesa_glsl
+LOCAL_STATIC_LIBRARIES += libmesa_nir
 
 # generate sources
 LOCAL_MODULE_CLASS := STATIC_LIBRARIES
@@ -64,5 +64,7 @@ $(intermediates)/util/u_format_srgb.c: $(intermediates)/%.c: $(LOCAL_PATH)/%.py
 $(intermediates)/util/u_format_table.c: $(intermediates)/%.c: $(LOCAL_PATH)/%.py $(LOCAL_PATH)/util/u_format.csv
        $(transform-generated-source)
 
+LOCAL_GENERATED_SOURCES += $(MESA_GEN_NIR_H)
+
 include $(GALLIUM_COMMON_MK)
 include $(BUILD_STATIC_LIBRARY)
index ed51835e1fb74e66382e9a9b6353b30afbca8ceb..8c1ab08498d42f8026f0bb1ee2de0e970fd137c1 100644 (file)
@@ -38,8 +38,10 @@ LOCAL_CFLAGS := \
 LOCAL_C_INCLUDES := \
        $(LOCAL_PATH)/ir3
 
+LOCAL_GENERATED_SOURCES := $(MESA_GEN_NIR_H)
+
 LOCAL_SHARED_LIBRARIES := libdrm libdrm_freedreno
-LOCAL_STATIC_LIBRARIES := libmesa_glsl
+LOCAL_STATIC_LIBRARIES := libmesa_glsl libmesa_nir
 LOCAL_MODULE := libmesa_pipe_freedreno
 
 include $(GALLIUM_COMMON_MK)
index 7ff4f86bf0d52b007e47e7e77ca9265fb38fec82..bb31519f000d3d1e14f983976bf1852cf748f2d0 100644 (file)
@@ -32,7 +32,6 @@ LOCAL_SRC_FILES := $(C_SOURCES)
 
 LOCAL_C_INCLUDES := \
        $(MESA_TOP)/src/mapi \
-       $(MESA_TOP)/src/glsl \
        $(MESA_TOP)/src/mesa
 
 
index f42a152aa8cc451f916f47c32a8058444b7e52cf..2efb472263698661e3b611118746919e8a7d2709 100644 (file)
@@ -28,9 +28,11 @@ include $(CLEAR_VARS)
 LOCAL_SRC_FILES := \
        $(C_SOURCES)
 
+LOCAL_GENERATED_SOURCES := $(MESA_GEN_NIR_H)
+
 LOCAL_SHARED_LIBRARIES := libdrm
-# We need libmesa_glsl to get NIR's generated include directories.
-LOCAL_STATIC_LIBRARIES := libmesa_glsl
+# We need libmesa_nir to get NIR's generated include directories.
+LOCAL_STATIC_LIBRARIES := libmesa_nir
 LOCAL_MODULE := libmesa_pipe_vc4
 
 include $(GALLIUM_COMMON_MK)
index 2a7738e6979e69a27253acb9959ddb76e4098323..4acd093f78494362d6626f72acfdc7eefd582eab 100644 (file)
@@ -109,6 +109,8 @@ LOCAL_WHOLE_STATIC_LIBRARIES := \
        libmesa_st_dri \
        libmesa_st_mesa \
        libmesa_glsl \
+       libmesa_compiler \
+       libmesa_nir \
        libmesa_dri_common \
        libmesa_megadriver_stub \
        libmesa_gallium \
index ba952da4ad4aff7f9fa99c11fd1b8e893f4f577a..a3e6c6d55ae441f38aee5d5b70bc396a73dff320 100644 (file)
@@ -59,7 +59,6 @@ endif
 LOCAL_C_INCLUDES := \
        $(MESA_TOP)/src/mapi \
        $(MESA_TOP)/src/mesa/main \
-       $(MESA_TOP)/src/glsl \
        $(MESA_TOP)/src/compiler/nir \
        $(MESA_TOP)/src/gallium/include \
        $(MESA_TOP)/src/gallium/auxiliary
index 894ae20a239495d9012464b139d2ea11396cebdc..5a80f221c8f7eef819a696e057a7fb8cd5a687a7 100644 (file)
@@ -36,7 +36,6 @@ include $(CLEAR_VARS)
 LOCAL_MODULE := libmesa_glsl_utils
 
 LOCAL_C_INCLUDES := \
-       $(MESA_TOP)/src/glsl \
        $(MESA_TOP)/src/compiler/nir \
        $(MESA_TOP)/src/mapi \
        $(MESA_TOP)/src/gallium/include \
@@ -62,7 +61,6 @@ LOCAL_IS_HOST_MODULE := true
 LOCAL_CFLAGS := -D_POSIX_C_SOURCE=199309L
 
 LOCAL_C_INCLUDES := \
-       $(MESA_TOP)/src/glsl \
        $(MESA_TOP)/src/compiler/nir \
        $(MESA_TOP)/src/mapi \
        $(MESA_TOP)/src/gallium/include \
index ee8887b73ec40e15258c78b8d75ea684ec03fe38..9fd9460a5bac4af55b0cb79a34d640e92aa770cf 100644 (file)
@@ -54,7 +54,6 @@ endif
 LOCAL_C_INCLUDES := \
        $(MESA_TOP)/src/mapi \
        $(MESA_TOP)/src/mesa/main \
-       $(MESA_TOP)/src/glsl \
        $(MESA_TOP)/src/compiler/nir \
        $(MESA_TOP)/src/gallium/auxiliary \
        $(MESA_TOP)/src/gallium/include
index 6e301f90416bd713acf8a2e8ef6e6e89f9fb2442..4fcf73a631d7bfec9b42826b163248d5b8da9069 100644 (file)
@@ -35,8 +35,7 @@ LOCAL_MODULE := mesa_gen_matypes
 LOCAL_IS_HOST_MODULE := true
 
 LOCAL_C_INCLUDES := \
-       $(MESA_TOP)/src/mapi \
-       $(MESA_TOP)/src/glsl
+       $(MESA_TOP)/src/mapi
 
 LOCAL_SRC_FILES := \
        x86/gen_matypes.c
index 42bfd77d4671f07dd98931c35f89b71f3273ef8d..1789762663a5260507e6bef2219d1081b5396db8 100644 (file)
@@ -42,6 +42,8 @@ MESA_DRI_C_INCLUDES := \
 
 MESA_DRI_WHOLE_STATIC_LIBRARIES := \
        libmesa_glsl \
+       libmesa_compiler \
+       libmesa_nir \
        libmesa_megadriver_stub \
        libmesa_dri_common \
        libmesa_dricore \
index 741ea260e94961d004315d51d27791fc8ea2b1db..b95d5c1a3a5df5dfcb65aef613c82266d5a0ca95 100644 (file)
@@ -54,7 +54,8 @@ LOCAL_SHARED_LIBRARIES := \
        libdrm_intel
 
 LOCAL_GENERATED_SOURCES := \
-       $(MESA_DRI_OPTIONS_H)
+       $(MESA_DRI_OPTIONS_H) \
+       $(MESA_GEN_NIR_H)
 
 include $(MESA_COMMON_MK)
 include $(BUILD_SHARED_LIBRARY)
index d30a053e10fa90ae45d43e65c175607b02ffc630..4f2e6dbca12c4afb1fe00a5173aa1eeaad63c83e 100644 (file)
@@ -59,7 +59,8 @@ LOCAL_SHARED_LIBRARIES := \
        libdrm_intel
 
 LOCAL_GENERATED_SOURCES := \
-       $(MESA_DRI_OPTIONS_H)
+       $(MESA_DRI_OPTIONS_H) \
+       $(MESA_GEN_NIR_H)
 
 include $(MESA_COMMON_MK)
 include $(BUILD_SHARED_LIBRARY)
index 0bc97a6b3d4a0eb1f824dfd1beaaa29db678664f..6f485439d642424d567ec807bf5ab494afdddb91 100644 (file)
@@ -44,7 +44,7 @@ include $(CLEAR_VARS)
 
 LOCAL_MODULE := libmesa_program
 LOCAL_MODULE_CLASS := STATIC_LIBRARIES
-LOCAL_STATIC_LIBRARIES := libmesa_glsl
+LOCAL_STATIC_LIBRARIES := libmesa_nir
 
 intermediates := $(call local-generated-sources-dir)
 
@@ -74,12 +74,13 @@ $(intermediates)/program/lex.yy.c: $(LOCAL_PATH)/program_lexer.l
 LOCAL_C_INCLUDES := \
        $(MESA_TOP)/src/mapi \
        $(MESA_TOP)/src/mesa \
-       $(MESA_TOP)/src/glsl \
        $(MESA_TOP)/src/compiler/nir \
        $(MESA_TOP)/src/gallium/auxiliary \
        $(MESA_TOP)/src/gallium/include
 
 LOCAL_EXPORT_C_INCLUDE_DIRS := $(intermediates)
 
+LOCAL_GENERATED_SOURCES += $(MESA_GEN_NIR_H)
+
 include $(MESA_COMMON_MK)
 include $(BUILD_STATIC_LIBRARY)