[all-commits] [llvm/llvm-project] f97a60: [Darwin] Add and adopt a way to query the Darwin k...

Julian Lettner via All-commits all-commits at lists.llvm.org
Mon Jun 1 10:37:31 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: f97a609b1763d7e343f52a7061727c4874bc26df
      https://github.com/llvm/llvm-project/commit/f97a609b1763d7e343f52a7061727c4874bc26df
  Author: Julian Lettner <julian.lettner at apple.com>
  Date:   2020-06-01 (Mon, 01 Jun 2020)

  Changed paths:
    M compiler-rt/lib/sanitizer_common/sanitizer_mac.cpp
    M compiler-rt/lib/sanitizer_common/sanitizer_mac.h

  Log Message:
  -----------
  [Darwin] Add and adopt a way to query the Darwin kernel version

This applies the learnings from [1].  What I intended as a simple
cleanup made me realize that the compiler-rt version checks have two
separate issues:

1) In some places (e.g., mmap flag setting) what matters is the kernel
   version, not the OS version.
2) OS version checks are implemented by querying the kernel version.
   This is not necessarily correct inside the simulators if the
   simulator runtime isn't aligned with the host macOS.

This commit tackles 1) by adopting a separate query function for the
Darwin kernel version.  2) (and cleanups) will be dealt with in
follow-ups.

[1] https://reviews.llvm.org/D78942

rdar://63031937

Reviewed By: delcypher

Differential Revision: https://reviews.llvm.org/D79965




More information about the All-commits mailing list