Commit Graph

6 Commits

Author SHA1 Message Date
Mauro Rossi 7dd3b99eab android: add support for classic dri-drivers (v2)
(v1) Changelog:

-Ddri-drivers option is added in MESON_GEN_NINJA
$(foreach ) cycle copies *_dri.so files to /vendor/lib{64}/dri/

(v2) Changelog

Remove unwanted Symlinks created for classic dri drivers
Update the comments describing each step
Rename .symlinks.timestamp to .targets.timestamp
Squash all the changes in one commit to facilitate picking in mesa stable

HowTo:
BoardConfig.mk: BOARD_MESA3D_CLASSIC_DRIVERS defines the list of classic dri drivers
example: BOARD_MESA3D_CLASSIC_DRIVERS := i965

Fixes: 8621bd8d ("android: Add scripts to build using meson")
Cc: "21.3" "21.2" mesa-stable
Reviewed-by: Roman Stratiienko <r.stratiienko@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13973>
2021-12-17 22:30:50 +00:00
Mauro Rossi ae3b08fb97 android: define cpp_rtti=false because libLLVM is built w/o RTTI (v2)
libLLVM for Android is built without RTTI, but after commit ad86267
mesa inherits meson default RTTI enabled state.

cpp_rtti=false is added to meson options in android/mesa3d_cross.mk

(v2) Add Fixes tag and use spaces instead of tabs for aligning the trailing \

Signed-off-by: Mauro Rossi <issor.oruam@gmail.com>
Fixes: ad862674 ("meson: Don't override built-in cpp_rtti option, error if it's invalid")
Cc: "21.3" "21.2" mesa-stable
Reviewed-by: Marijn Suijten <marijn.suijten@somainline.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13901>
(cherry picked from commit 1ba231fb75)
2021-12-01 18:55:48 +00:00
Roman Stratiienko 0ba31a494d android.mk: Add missing variables to the make target
Android build system may use different internal variables to specify
cflags/cppflags.
Small change in product confguration may force Android to use diffrent
set of variables, therefore we should keep all of them attached to the
make rule's target.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5549
Fixes: 8621bd8d5e ("android: Add scripts to build using meson")
Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
Acked-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Marijn Suijten <marijn.suijten@somainline.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13914>
(cherry picked from commit 32ec0fffa6)
2021-12-01 18:55:47 +00:00
Roman Stratiienko 21de785562 AOSP: Update timestamps of target binaries
Fixes warning during the build and unnecessary rule execution:
***
ninja: Missing `restat`? An output file is older than the most recent input:
***

Fixes: 8621bd8d5e ("android: Add scripts to build using meson")
Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
Tested-by: Mauro Rossi <issor.oruam@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12304>
2021-08-16 09:18:46 +00:00
Roman Stratiienko 80f42e1d15 AOSP: Do not add '-Wl,--gc-sections' to the linker arguments
With '-Wl,--gc-sections' meson.build cc.has_function() will never fail,
providing wrong input to the build system.

Fixes: 8621bd8d5e ("android: Add scripts to build using meson")
Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
Tested-by: Mauro Rossi <issor.oruam@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11637>
2021-07-07 18:32:28 +00:00
Roman Stratiienko 8621bd8d5e android: Add scripts to build using meson
How to use:
- For GALLIUM drivers:
1. Add gallium drivers into your board.mk file:
board.mk:
    BOARD_MESA3D_USES_MESON_BUILD := true
    BOARD_MESA3D_GALLIUM_DRIVERS := lima panfrost v3d

2. Add the following packages into your device.mk file:
device.mk:
    PRODUCT_PACKAGES += \
        libEGL_mesa \
        libGLESv1_CM_mesa \
        libGLESv2_mesa \
        libgallium_dri \
        libglapi

- For VULKAN drivers:
1. Add single vulkan driver into your board.mk file:
board.mk:
    BOARD_MESA3D_USES_MESON_BUILD := true
    BOARD_MESA3D_VULKAN_DRIVERS := freedreno broadcom

2. Add the following package configuration into your device.mk file:
device.mk:
    PRODUCT_PACKAGES += \
       vulkan.freedreno
    PRODUCT_PROPERTY_OVERRIDES += \
       ro.hardware.vulkan=freedreno

- To build 'libgbm' set definition in the board.mk:
    BOARD_MESA3D_BUILD_LIBGBM := true
  And add a package to the device.mk:
    PRODUCT_PACKAGES += libgbm

Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Tested-by: Mauro Rossi <issor.oruam@gmail.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10183>
2021-06-07 16:04:15 +00:00