From afb62b0e96e9bf91ec99857cc16ddb094bcaa3be Mon Sep 17 00:00:00 2001 From: "Dr. David Alan Gilbert" Date: Sun, 20 Sep 2020 16:36:57 +0100 Subject: Fix AVX2 cpuid checks MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit At the moment test_cpu_runtime_detection_AVX2.cxx is compiled with -mavx2 to allow it to use the intrinsics; however the compiler jumps at the chance to use newer instructions outside the actual test; in my case using AVX in the string manipulation in addTestsToSuite when my CPU doesn't actually have AVX. Swing the actual check into a separate file and only compile that with the extra flag. We probably need the same change for the SSE* checks as well. Change-Id: I1683231932fff264a87c96ac95ac1d24b921163a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103075 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl --- tools/CppunitTest_tools_test.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tools/CppunitTest_tools_test.mk') diff --git a/tools/CppunitTest_tools_test.mk b/tools/CppunitTest_tools_test.mk index aa5ac4606d02..48c667425ce4 100644 --- a/tools/CppunitTest_tools_test.mk +++ b/tools/CppunitTest_tools_test.mk @@ -32,10 +32,11 @@ $(eval $(call gb_CppunitTest_add_exception_objects,tools_test, \ tools/qa/cppunit/test_xmlwalker \ tools/qa/cppunit/test_GenericTypeSerializer \ tools/qa/cppunit/test_cpuid \ + tools/qa/cppunit/test_cpu_runtime_detection_AVX2 \ )) $(eval $(call gb_CppunitTest_add_exception_objects,tools_test,\ - tools/qa/cppunit/test_cpu_runtime_detection_AVX2, $(CXXFLAGS_INTRINSICS_AVX2) \ + tools/qa/cppunit/test_cpu_runtime_detection_AVX2_check, $(CXXFLAGS_INTRINSICS_AVX2) \ )) $(eval $(call gb_CppunitTest_add_exception_objects,tools_test,\ -- cgit v1.2.3