ladybird/Ladybird/cmake/EnableLLD.cmake
Andrew Kaster 261f078a28 Ladybird/Meta: Add Android build
Build an Android APK file that, when configured properly in Qt Creator,
can be used to deploy the browser to an Android device.

The current build requires NDK 24, targets no less than Android API 30,
and Qt Creator 6.4.0.
2022-12-25 07:58:58 -07:00

17 lines
585 B
CMake

# Copyright (c) 2022, Andrew Kaster <akaster@serenityos.org>
#
# SPDX-License-Identifier: BSD-2-Clause
#
option(LADYBIRD_USE_LLD "Use llvm lld to link application" ON)
if (LADYBIRD_USE_LLD AND NOT APPLE)
find_program(LLD_LINKER NAMES "ld.lld")
if (NOT LLD_LINKER)
message(INFO "LLD not found, cannot use to link. Disabling option...")
set(LADYBIRD_USE_LLD OFF CACHE BOOL "" FORCE)
endif()
endif()
if (LADYBIRD_USE_LLD AND NOT APPLE)
add_link_options(-fuse-ld=lld)
add_compile_options(-ggnu-pubnames)
add_link_options(LINKER:--gdb-index)
endif()