Skip to content

Commit

Permalink
CMake: Fix conditions for some subarch features
Browse files Browse the repository at this point in the history
The AES and SHA features were checking for the wrong TEST_subarch_foo
variables.

Pick-to: 6.0
Task-number: QTBUG-87376
Change-Id: I46cd14d98832529aebac22cfcb01180330c5e091
Reviewed-by: Joerg Bornemann <[email protected]>
  • Loading branch information
alcroito committed Dec 4, 2020
1 parent 88e9e88 commit 2f1c087
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions .prev_configure.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -761,13 +761,13 @@ qt_feature_definition("avx512vbmi" "QT_COMPILER_SUPPORTS_AVX512VBMI" VALUE "1")
qt_feature_config("avx512vbmi" QMAKE_PRIVATE_CONFIG)
qt_feature("aesni"
LABEL "AES"
CONDITION QT_FEATURE_sse2 AND TEST_subarch_aes
CONDITION QT_FEATURE_sse2 AND TEST_subarch_aesni
)
qt_feature_definition("aesni" "QT_COMPILER_SUPPORTS_AES" VALUE "1")
qt_feature_config("aesni" QMAKE_PRIVATE_CONFIG)
qt_feature("rdrnd"
LABEL "RDRAND"
CONDITION TEST_subarch_rdseed
CONDITION TEST_subarch_rdrnd
)
qt_feature_definition("rdrnd" "QT_COMPILER_SUPPORTS_RDRND" VALUE "1")
qt_feature_config("rdrnd" QMAKE_PRIVATE_CONFIG)
Expand All @@ -779,7 +779,7 @@ qt_feature_definition("rdseed" "QT_COMPILER_SUPPORTS_RDSEED" VALUE "1")
qt_feature_config("rdseed" QMAKE_PRIVATE_CONFIG)
qt_feature("shani"
LABEL "SHA"
CONDITION QT_FEATURE_sse2 AND TEST_subarch_sha
CONDITION QT_FEATURE_sse2 AND TEST_subarch_shani
)
qt_feature_definition("shani" "QT_COMPILER_SUPPORTS_SHA" VALUE "1")
qt_feature_config("shani" QMAKE_PRIVATE_CONFIG)
Expand Down
6 changes: 3 additions & 3 deletions configure.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -774,13 +774,13 @@ qt_feature_definition("avx512vbmi" "QT_COMPILER_SUPPORTS_AVX512VBMI" VALUE "1")
qt_feature_config("avx512vbmi" QMAKE_PRIVATE_CONFIG)
qt_feature("aesni"
LABEL "AES"
CONDITION QT_FEATURE_sse2 AND TEST_subarch_aes
CONDITION QT_FEATURE_sse2 AND TEST_subarch_aesni
)
qt_feature_definition("aesni" "QT_COMPILER_SUPPORTS_AES" VALUE "1")
qt_feature_config("aesni" QMAKE_PRIVATE_CONFIG)
qt_feature("rdrnd"
LABEL "RDRAND"
CONDITION TEST_subarch_rdseed
CONDITION TEST_subarch_rdrnd
)
qt_feature_definition("rdrnd" "QT_COMPILER_SUPPORTS_RDRND" VALUE "1")
qt_feature_config("rdrnd" QMAKE_PRIVATE_CONFIG)
Expand All @@ -792,7 +792,7 @@ qt_feature_definition("rdseed" "QT_COMPILER_SUPPORTS_RDSEED" VALUE "1")
qt_feature_config("rdseed" QMAKE_PRIVATE_CONFIG)
qt_feature("shani"
LABEL "SHA"
CONDITION QT_FEATURE_sse2 AND TEST_subarch_sha
CONDITION QT_FEATURE_sse2 AND TEST_subarch_shani
)
qt_feature_definition("shani" "QT_COMPILER_SUPPORTS_SHA" VALUE "1")
qt_feature_config("shani" QMAKE_PRIVATE_CONFIG)
Expand Down
6 changes: 3 additions & 3 deletions util/cmake/configurejson2cmake.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def map_tests(test: str) -> Optional[str]:
"c99": "c_std_99 IN_LIST CMAKE_C_COMPILE_FEATURES",
"c11": "c_std_11 IN_LIST CMAKE_C_COMPILE_FEATURES",
"x86SimdAlways": "ON", # FIXME: Make this actually do a compile test.
"aesni": "TEST_subarch_aes",
"aesni": "TEST_subarch_aesni",
"avx": "TEST_subarch_avx",
"avx2": "TEST_subarch_avx2",
"avx512f": "TEST_subarch_avx512f",
Expand Down Expand Up @@ -99,9 +99,9 @@ def map_tests(test: str) -> Optional[str]:
"pdpid": "TEST_subarch_rdpid",
"rdpid": "TEST_subarch_rdpid",
"rdseed": "TEST_subarch_rdseed",
"rdrnd": "TEST_subarch_rdseed", # FIXME: Is this the right thing?
"rdrnd": "TEST_subarch_rdrnd",
"rtm": "TEST_subarch_rtm",
"shani": "TEST_subarch_sha",
"shani": "TEST_subarch_shani",
"shstk": "TEST_subarch_shstk",
"sse2": "TEST_subarch_sse2",
"sse3": "TEST_subarch_sse3",
Expand Down

0 comments on commit 2f1c087

Please sign in to comment.