Issues with the precompiled LLVM 12 for macOS

Hey folks,

I just wanted to send you a heads up that there is an issue with the precompiled LLVM package for macOS.
The LLVMConfig.cmake has a very specific path hardcoded in it:

    set_target_properties(LLVMSupport PROPERTIES
      INTERFACE_LINK_LIBRARIES "m;ZLIB::ZLIB;/Applications/;LLVMDemangle"

Any build that depends on LLVMSupport fails unless there is this very specific macOS SDK present.

The workaround is rather straightforward:

    find_package(LLVM REQUIRED CONFIG)

    if (APPLE)
        set_target_properties(LLVMSupport PROPERTIES
          INTERFACE_LINK_LIBRARIES "z;curses;m;LLVMDemangle")

It never happened before at least since the version 3.9, so I guess an automated check might be an overkill.
But I'm curious how can we prevent this from happening again?


Hi Alex,

Wouldn't this be configured by a person/project providing these packages for macOS? AFAIK, this is not hard-coded in LLVM itself, is it?


Hi Andrzej,

It is certainly not hardcoded in LLVM itself.
I assume there is some validation step for a package before submission?
I'm wondering if this validation can be extended to, say, grep for "" or something :slight_smile:

(cc'ed Tom Stellard as the release manager)



I am the release tester that build the macOS builds. This file is
generated from the cmake build system in LLVM, a quick grep in the
source seems to indicate that it happens here:

I am unfamiliar with using LLVM libraries with the config file as you
describe - I would suggest you try to patch the file above and try to
get the result you are looking for and then submit a patch.

The script I use to build the release is in
llvm/utils/release/, I am not sure if any other
validation is done except running the unit-tests.