diff options
author | Luboš Luňák <l.lunak@collabora.com> | 2021-10-26 23:43:48 +0200 |
---|---|---|
committer | Luboš Luňák <l.lunak@collabora.com> | 2021-10-27 08:39:10 +0200 |
commit | 12c6b1ef6a824b09778163ec83fc44bb196e65db (patch) | |
tree | be5e078e74d35a6e4c113c78a7399127250348be /sc/Library_sc.mk | |
parent | 524a0b57ace6cb663df411ab0d8298c5aff6a226 (diff) |
try harder not to mix CPU-specific code with generic code
Jenkins Windows builds occassionally fails with illegal instruction
(https://ci.libreoffice.org/job/gerrit_windows/110191/console).
This seems to be because those AVX etc. files use std::abs(double),
which is really just a fancy inline function calling the real
fabs() or whatever function. And in debug builds inlines do not
get inlined, they get emitted as copies. And since arraysumAVX.cxx
is listed as the first object for Library_sc, apparently the linker
likes to pick up the AVX-compiled inline function as the std::abs()
version to use for Library_sc.
Try to avoid this in two ways:
- move the CPU-specific object files later in the list of library
files
- use plain C headers in those sources, no fancy <cmath>
Change-Id: Ifd14076f79e9fbd7cc4c4a63a9764dff6715e63a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124249
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Diffstat (limited to 'sc/Library_sc.mk')
-rw-r--r-- | sc/Library_sc.mk | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/sc/Library_sc.mk b/sc/Library_sc.mk index a85650e935e6..ef9c62f42d53 100644 --- a/sc/Library_sc.mk +++ b/sc/Library_sc.mk @@ -99,18 +99,6 @@ $(eval $(call gb_Library_use_libraries,sc,\ )) $(eval $(call gb_Library_add_exception_objects,sc,\ - sc/source/core/tool/arraysumAVX512, $(CXXFLAGS_INTRINSICS_AVX512F) \ -)) - -$(eval $(call gb_Library_add_exception_objects,sc,\ - sc/source/core/tool/arraysumAVX, $(CXXFLAGS_INTRINSICS_AVX) \ -)) - -$(eval $(call gb_Library_add_exception_objects,sc,\ - sc/source/core/tool/arraysumSSE2, $(CXXFLAGS_INTRINSICS_SSE2) \ -)) - -$(eval $(call gb_Library_add_exception_objects,sc,\ sc/source/core/data/attarray \ sc/source/core/data/attrib \ sc/source/core/data/autonamecache \ @@ -692,6 +680,18 @@ $(eval $(call gb_Library_add_exception_objects,sc,\ sc/source/ui/xmlsource/xmlsourcedlg \ )) +$(eval $(call gb_Library_add_exception_objects,sc,\ + sc/source/core/tool/arraysumAVX512, $(CXXFLAGS_INTRINSICS_AVX512F) \ +)) + +$(eval $(call gb_Library_add_exception_objects,sc,\ + sc/source/core/tool/arraysumAVX, $(CXXFLAGS_INTRINSICS_AVX) \ +)) + +$(eval $(call gb_Library_add_exception_objects,sc,\ + sc/source/core/tool/arraysumSSE2, $(CXXFLAGS_INTRINSICS_SSE2) \ +)) + ifeq ($(ENABLE_FORMULA_LOGGER),TRUE) $(eval $(call gb_Library_add_exception_objects,sc,\ sc/source/core/tool/formulalogger \ |