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>
This commit is contained in:
Roman Stratiienko 2021-06-16 18:00:06 +03:00 committed by Marge Bot
parent 97c19ac358
commit 80f42e1d15
1 changed files with 3 additions and 2 deletions

View File

@ -170,8 +170,9 @@ define m-lld-flags-cleaned
$(subst out/,$(AOSP_ABSOLUTE_PATH)/out/, \
$(subst -Wl$(comma)--fatal-warnings,, \
$(subst -Wl$(comma)--no-undefined-version,, \
$(patsubst %dummy.o,, \
$(m-lld-flags))))))
$(subst -Wl$(comma)--gc-sections,, \
$(patsubst %dummy.o,, \
$(m-lld-flags)))))))
endef
define m-cpp-flags