diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2022-07-15 12:38:18 -0700 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2022-07-22 01:45:50 +0000 |
commit | dd4875b54c85d14e0489af66c1e6697de862ce17 (patch) | |
tree | 34589ab19ecf9e133a340ffe15ffd94342259bef /cmake | |
parent | d8e584c7a6466483039a1ddba8d65800d58c1052 (diff) |
Fix attempt to use -mno-direct-extern-access with Clang
Clang has the option, but spells it differently.
Fixes: QTBUG-105002
Change-Id: I36b24183fbd041179f2ffffd170217e82ff6d14d
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 78ef9e9d14f170c410c2fb52f5aada8421ed8f07)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/QtPlatformTargetHelpers.cmake | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/cmake/QtPlatformTargetHelpers.cmake b/cmake/QtPlatformTargetHelpers.cmake index e9f40d0565..47cffc8040 100644 --- a/cmake/QtPlatformTargetHelpers.cmake +++ b/cmake/QtPlatformTargetHelpers.cmake @@ -42,7 +42,8 @@ function(qt_internal_setup_public_platform_target) target_link_options(Platform INTERFACE "${libc_link_option}") endif() if (QT_FEATURE_no_extern_direct_access) - target_compile_options(Platform INTERFACE "-mno-direct-extern-access") + target_compile_options(Platform INTERFACE "$<$<CXX_COMPILER_ID:GNU>:-mno-direct-extern-access>") + target_compile_options(Platform INTERFACE "$<$<CXX_COMPILER_ID:Clang>:-fno-direct-access-external-data>") endif() qt_set_msvc_cplusplus_options(Platform INTERFACE) |