Skip to content

Commit

Permalink
CMake: Add --enable-new-dtags flag support
Browse files Browse the repository at this point in the history
Remove enable-new-dtags from feature mapping, handle it as regular
feature. Regenerate configure.cmake with 'enable-new-dtags' enabled.
Check for enable_new_dtags feature, add -Wl,--enable-new-dtags if
enabled.

Fixes: QTBUG-89013
Pick-to: 6.0
Change-Id: Ice57c02dc85f7f9ecf14e3bc65f31a57b589ce24
Reviewed-by: Joerg Bornemann <[email protected]>
Reviewed-by: Craig Scott <[email protected]>
  • Loading branch information
semlanik committed Dec 22, 2020
1 parent 1021cbf commit bbebfa0
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .prev_configure.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -635,6 +635,11 @@ qt_feature("ltcg"
CONDITION __qt_ltcg_detected
)
qt_feature_config("ltcg" QMAKE_PRIVATE_CONFIG)
qt_feature("enable_new_dtags"
LABEL "Using new DTAGS"
CONDITION LINUX AND TEST_enable_new_dtags
)
qt_feature_config("enable_new_dtags" QMAKE_PRIVATE_CONFIG)
qt_feature("enable_gdb_index"
LABEL "Generating GDB index"
AUTODETECT QT_FEATURE_developer_build
Expand Down
4 changes: 4 additions & 0 deletions cmake/QtInternalTargets.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,10 @@ if(QT_FEATURE_enable_gdb_index)
target_link_options(PlatformCommonInternal INTERFACE "-Wl,--gdb-index")
endif()

if(QT_FEATURE_enable_new_dtags)
target_link_options(PlatformCommonInternal INTERFACE "-Wl,--enable-new-dtags")
endif()

function(qt_get_implicit_sse2_genex_condition out_var)
set(is_shared_lib "$<STREQUAL:$<TARGET_PROPERTY:TYPE>,SHARED_LIBRARY>")
set(is_static_lib "$<STREQUAL:$<TARGET_PROPERTY:TYPE>,STATIC_LIBRARY>")
Expand Down
5 changes: 5 additions & 0 deletions configure.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -648,6 +648,11 @@ qt_feature("ltcg"
CONDITION __qt_ltcg_detected
)
qt_feature_config("ltcg" QMAKE_PRIVATE_CONFIG)
qt_feature("enable_new_dtags"
LABEL "Using new DTAGS"
CONDITION LINUX AND TEST_enable_new_dtags
)
qt_feature_config("enable_new_dtags" QMAKE_PRIVATE_CONFIG)
qt_feature("enable_gdb_index"
LABEL "Generating GDB index"
AUTODETECT QT_FEATURE_developer_build
Expand Down
1 change: 0 additions & 1 deletion util/cmake/configurejson2cmake.py
Original file line number Diff line number Diff line change
Expand Up @@ -900,7 +900,6 @@ def get_feature_mapping():
"condition": "CMAKE_BUILD_TYPE STREQUAL Debug OR Debug IN_LIST CMAKE_CONFIGURATION_TYPES",
},
"dlopen": {"condition": "UNIX"},
"enable_new_dtags": None,
"force_debug_info": {
"autoDetect": "CMAKE_BUILD_TYPE STREQUAL RelWithDebInfo OR RelWithDebInfo IN_LIST CMAKE_CONFIGURATION_TYPES"
},
Expand Down

0 comments on commit bbebfa0

Please sign in to comment.