about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2022-07-01 23:39:07 +0200
committerGitHub <noreply@github.com>2022-07-01 23:39:07 +0200
commit01aa10c2ffd49238d0aef83253190c8df0d77c87 (patch)
treea6b1e1e54a7f726afb79df01a37b89a51c7c9fb2 /compiler/rustc_codegen_llvm/src
parent194764fdc070d95ce2200548a2e6267d701068bd (diff)
parentb6e28b59679e3e4ee47b20090035ef33889b3f3b (diff)
downloadrust-01aa10c2ffd49238d0aef83253190c8df0d77c87.tar.gz
rust-01aa10c2ffd49238d0aef83253190c8df0d77c87.zip
Rollup merge of #98418 - topjohnwu:macos-dylib, r=jyn514
Allow macOS to build LLVM as shared library

Inspired by how [homebrew](https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/llvm.rb) builds and distributes llvm, here we manually create a symlink with a versioned dylib path to make `llvm-config` work properly. Note, the resulting `rustc` executable and `librustc_driver-<hash>.dylib` still links to the un-versioned `libLLVM.dylib` as expected when distributed in the final output. I have confirmed this by checking `otool -L` on both binaries.

After the change, enabling `llvm.link-shared` and `llvm.thin-lto` will be possible on macOS.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
0 files changed, 0 insertions, 0 deletions