Skip to content

Conversation

@lulicdarko
Copy link

@lulicdarko lulicdarko commented Jan 21, 2026

Added option to enable new dtags.

Explanation:
This change introduces a Cmake option ENABLE_NEW_DTAGS to allow to use --enable-new-dtags for WPE Webkit build.
Primary goal is to force the linker to use DT_RUNPATH instead of legacy DT_RPATH. This change is important because:

  1. DT_RUNPATH respects LD_LIBRARY_PATH unlike older DT_RPATH
  2. This allows us to override system libraries or redirect library lookup at runtime without re-linkiing the entire Webkit.

Changes:

  • Source/cmake/OptionsCommon.cmake

Copy link

@magomez magomez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The approach should be defining a new option DISABLE_NEW_DTAGS, and then use it together with LD_SUPPORTS_DISABLE_NEW_DTAGS to produce the desired value, like it's done for other options in the same file.

Something like

if (LD_SUPPORTS_DISABLE_NEW_DTAGS)
set(DISABLE_NEW_DTAGS_DEFAULT ON)
else ()
set(DISABLE_NEW_DTAGS_DEFAULT OFF)
endif ()

option(DISABLE_NEW_DTAGS "Disable new dtags" ${DISABLE_NEW_DTAGS_DEFAULT})

if (DISABLE_NEW_DTAGS)
disable the dtags
else ()
enable the dtags

endif ()
if (LD_USAGE MATCHES "--disable-new-dtags")
set(LD_SUPPORTS_DISABLE_NEW_DTAGS TRUE)
option(LD_SUPPORTS_DISABLE_NEW_DTAGS "" OFF)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LD_SUPPORTS_DISABLE_NEW_DTAGS contains whether --disable-new-tags is supported by the linker. It shouldn't be turned into an option.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm afraid you haven't removed this option and now it's duplicated.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm afraid you haven't removed this option and now it's duplicated.

Done, somehow after squash it was restored.

@lulicdarko
Copy link
Author

The approach should be defining a new option DISABLE_NEW_DTAGS, and then use it together with LD_SUPPORTS_DISABLE_NEW_DTAGS to produce the desired value, like it's done for other options in the same file.

Something like

if (LD_SUPPORTS_DISABLE_NEW_DTAGS) set(DISABLE_NEW_DTAGS_DEFAULT ON) else () set(DISABLE_NEW_DTAGS_DEFAULT OFF) endif ()

option(DISABLE_NEW_DTAGS "Disable new dtags" ${DISABLE_NEW_DTAGS_DEFAULT})

if (DISABLE_NEW_DTAGS) disable the dtags else () enable the dtags

Hi @magomez i made changes and commited :b72b5c4.

I need to ammend also bb file and 2.38 cmake if this commit looks ok.

@magomez
Copy link

magomez commented Jan 23, 2026

Please, join those commits into a single one, as they are part of the same change.

@lulicdarko lulicdarko force-pushed the RDKEMW-9893_enable_new_dtags_2.46 branch from b72b5c4 to 52049a6 Compare January 23, 2026 08:32
@lulicdarko
Copy link
Author

Please, join those commits into a single one, as they are part of the same change.

Done

RDKEMW-9893: added option to enable new dtags.
@lulicdarko lulicdarko force-pushed the RDKEMW-9893_enable_new_dtags_2.46 branch from 52049a6 to 05c2201 Compare January 23, 2026 09:12
@magomez magomez merged commit 2f0e26e into WebPlatformForEmbedded:wpe-2.46 Jan 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

3 participants