Skip to content

ci: use 24.04 for msan

b6b0ff0
Select commit
Loading
Failed to load commit list.
Draft

merging: up to v25 branch #1415

ci: use 24.04 for msan
b6b0ff0
Select commit
Loading
Failed to load commit list.
Cirrus CI / lint [bookworm] failed May 2, 2025 in 9m 23s

Task Summary

Instruction lint failed in 08:27

Details

✅ 00:03 clone
✅ 00:14 merge_base
✅ 00:04 python
✅ 00:31 unshallow
❌ 08:27 lint

+fi
+
+# Check that no repo files have been modified by the build.
+# (This fails for example if the precomp files need to be updated in the repo.)
+git diff --exit-code
diff --git a/cmake/Check64bitAssembly.cmake b/cmake/Check64bitAssembly.cmake
new file mode 100644
index 0000000000..3f65887765
--- /dev/null
+++ b/cmake/Check64bitAssembly.cmake
@@ -0,0 +1,14 @@
+include(CheckCSourceCompiles)
+
+function(check_64bit_assembly)
+  check_c_source_compiles("
+    #include <stdint.h>
+
+    int main()
+    {
+      uint64_t a = 11, tmp;
+      __asm__ __volatile__(\"movq $0x100000000,%1; mulq %%rsi\" : \"+a\"(a) : \"S\"(tmp) : \"cc\", \"%rdx\");
+    }
+  " HAS_64BIT_ASM)
+  set(HAS_64BIT_ASM ${HAS_64BIT_ASM} PARENT_SCOPE)
+endfunction()
diff --git a/cmake/TryAddCompileOption.cmake b/cmake/TryAddCompileOption.cmake
new file mode 100644
index 0000000000..f53c252c2d
--- /dev/null
+++ b/cmake/TryAddCompileOption.cmake
@@ -0,0 +1,23 @@
+include(CheckCCompilerFlag)
+
+function(try_add_compile_option option)
+  string(MAKE_C_IDENTIFIER ${option} result)
+  string(TOUPPER ${result} result)
+  set(result "C_SUPPORTS${result}")
+  set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)
+  if(NOT MSVC)
+    set(CMAKE_REQUIRED_FLAGS "-Werror")
+  endif()
+  check_c_compiler_flag(${option} ${result})
+  if(${result})
+    get_property(compile_options
+      DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
+      PROPERTY COMPILE_OPTIONS
+    )
+    list(APPEND compile_options "${option}")
+    set_property(
+      DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
+      PROPERTY COMPILE_OPTIONS "${compile_options}"
+    )
+  endif()
+endfunction()
FAIL: subtree directory was touched without subtree merge
���������