[llvm] [BOLT] Detect Linux kernel version if the binary is a Linux kernel (PR #119088)

via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 9 09:59:47 PST 2024


================
@@ -1205,6 +1225,9 @@ void RewriteInstance::discoverFileObjects() {
     PreviousFunction = BF;
   }
 
+  if (BC->IsLinuxKernel && !std::get<0>(BC->LinuxKernelVersion))
+    BC->errs() << "BOLT-WARNING: Linux kernel version is unknown\n";
----------------
FLZ101 wrote:

I've added a Linux kernel version for each related test and changed the behavior to erroring out.

https://github.com/llvm/llvm-project/pull/119088


More information about the llvm-commits mailing list