[all-commits] [llvm/llvm-project] f28c83: Fix issue where MACOSX_VERSION_MIN_FLAG was not se...

Chris Apple via All-commits all-commits at lists.llvm.org
Mon Apr 8 16:34:51 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f28c8339c12917b11c99432de6609e7d46e17e2b
      https://github.com/llvm/llvm-project/commit/f28c8339c12917b11c99432de6609e7d46e17e2b
  Author: Chris Apple <cja-private at pm.me>
  Date:   2024-04-08 (Mon, 08 Apr 2024)

  Changed paths:
    M compiler-rt/cmake/config-ix.cmake

  Log Message:
  -----------
  Fix issue where MACOSX_VERSION_MIN_FLAG was not set on subsequent runs of CMake in compiler-rt (#87580)

As discussed here:

https://github.com/llvm/llvm-project/pull/74394#issuecomment-2035264683

An unintentional change of behavior was introduced in #74394 

This code introduced in #74394 :

The first time through
* SANITIZER_MIN_OSX_VERSION is not set
* parse -mmacosx-version-min and set MACOSX_VERSION_MIN_FLAG
* Set and cache SANITIZER_MIN_OSX_VERSION

Subsequent times through:
* SANITIZER_MIN_OSX_VERSION is cached 
* (BUG!!) you don't parse -mmacosx-version-min, and don't set
MACOSX_VERSION_MIN_FLAG


MACOSX_VERSION_MIN_FLAG is used later in the file on this line:

https://github.com/llvm/llvm-project/blob/63c925ca808f216f805b76873743450456e350f2/compiler-rt/cmake/config-ix.cmake#L517


Hoisting this assignment outside the if block returns us to the previous
behavior before this commit, while maintaining the flexibility
introduced with the cache variable



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list