summaryrefslogtreecommitdiffstats
path: root/contrib/libs/cxxsupp/builtins/cpu_model/cpu_model.h
diff options
context:
space:
mode:
authorrobot-contrib <[email protected]>2025-03-15 14:02:39 +0300
committerrobot-contrib <[email protected]>2025-03-15 14:16:29 +0300
commit6158c49d34ad0fbaa31e3d4cf09e9b406d746a87 (patch)
tree0500f8522e863d87487097d9e64cdb836d6f7817 /contrib/libs/cxxsupp/builtins/cpu_model/cpu_model.h
parent6d60333c2d6410c3df68ef0349d9e96daac1b96a (diff)
Update contrib/libs/cxxsupp/builtins to 20.1.0
commit_hash:dd1bc46d7dc6022db73a1089f5678a733f50180c
Diffstat (limited to 'contrib/libs/cxxsupp/builtins/cpu_model/cpu_model.h')
-rw-r--r--contrib/libs/cxxsupp/builtins/cpu_model/cpu_model.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/contrib/libs/cxxsupp/builtins/cpu_model/cpu_model.h b/contrib/libs/cxxsupp/builtins/cpu_model/cpu_model.h
index 924ca89cf60..3bc4e63c4f2 100644
--- a/contrib/libs/cxxsupp/builtins/cpu_model/cpu_model.h
+++ b/contrib/libs/cxxsupp/builtins/cpu_model/cpu_model.h
@@ -31,7 +31,15 @@
// We're choosing init priority 90 to force our constructors to run before any
// constructors in the end user application (starting at priority 101). This
// value matches the libgcc choice for the same functions.
-#define CONSTRUCTOR_ATTRIBUTE __attribute__((constructor(90)))
+#ifdef _WIN32
+// Contructor that replaces the ifunc runs currently with prio 10, see
+// the LowerIFuncPass. The resolver of FMV depends on the cpu features so set
+// the priority to 9.
+#define CONSTRUCTOR_PRIORITY 9
+#else
+#define CONSTRUCTOR_PRIORITY 90
+#endif
+#define CONSTRUCTOR_ATTRIBUTE __attribute__((constructor(CONSTRUCTOR_PRIORITY)))
#else
// FIXME: For MSVC, we should make a function pointer global in .CRT$X?? so that
// this runs during initialization.