mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-22 01:02:14 -05:00
CMake: Add workaround for binutils+patchelf incompatability
This commit is contained in:
parent
7ee3727074
commit
c1596192fa
Notes:
github-actions[bot]
2024-12-13 00:23:30 +00:00
Author: https://github.com/ADKaster Commit: https://github.com/LadybirdBrowser/ladybird/commit/c1596192fa8 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2799
2 changed files with 12 additions and 1 deletions
|
@ -7,6 +7,9 @@ if (VCPKG_TARGET_ANDROID)
|
|||
include("UI/Android/vcpkg_android.cmake")
|
||||
endif()
|
||||
|
||||
# vcpkg flags depend on what linker we are using
|
||||
include("Meta/CMake/use_linker.cmake")
|
||||
|
||||
# Pass additional information to vcpkg toolchain files if we are using vcpkg.
|
||||
if (CMAKE_TOOLCHAIN_FILE MATCHES "vcpkg.cmake$")
|
||||
set(CMAKE_PROJECT_ladybird_INCLUDE_BEFORE "Meta/CMake/vcpkg/generate_vcpkg_toolchain_variables.cmake")
|
||||
|
@ -29,7 +32,6 @@ set(LADYBIRD_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
|
|||
list(APPEND CMAKE_MODULE_PATH "${LADYBIRD_SOURCE_DIR}/Meta/CMake")
|
||||
|
||||
include(UI/cmake/EnableLagom.cmake)
|
||||
include(use_linker)
|
||||
include(lagom_options NO_POLICY_SCOPE)
|
||||
include(lagom_compile_options)
|
||||
|
||||
|
|
|
@ -8,4 +8,13 @@ if (NOT "${CMAKE_CXX_COMPILER}" STREQUAL "")
|
|||
string(APPEND EXTRA_VCPKG_VARIABLES "set(ENV{CXX} ${CMAKE_CXX_COMPILER})\n")
|
||||
endif()
|
||||
|
||||
# Workaround for bad patchelf interaction with binutils 2.43.50
|
||||
# https://github.com/LadybirdBrowser/ladybird/issues/2149
|
||||
# https://github.com/microsoft/vcpkg/issues/41576
|
||||
# https://github.com/NixOS/patchelf/issues/568
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=2319341
|
||||
if (LINUX AND NOT LAGOM_USE_LINKER)
|
||||
string(APPEND EXTRA_VCPKG_VARIABLES "set(ENV{LDFLAGS} -Wl,-z,noseparate-code)\n")
|
||||
endif()
|
||||
|
||||
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/build-vcpkg-variables.cmake" "${EXTRA_VCPKG_VARIABLES}")
|
||||
|
|
Loading…
Reference in a new issue