EnzymeAD / EnzymeAD/Enzyme

error when linking against LLDEnzymeFlags CMake target

Open
#1,389 12 comments 0 reactions 0 assignees View on GitHub
Dominant language
LLVM
Stars
1.7k
Forks
188
Avg merge
1d 22h
Merged PRs (30d)
26

Description

When linking a library/executable against `LLDEnzymeFlags`:

```cmake
target_link_libraries(my_library PUBLIC LLDEnzymeFlags)
```

The link line is producing an error message (this is from a mac build):
```
ld64.lld: error: unknown argument '--load-pass-plugin=/path/to/my_library/build/lib/LLDEnzyme-16.dylib'
```

The path in the error message does point to the right shared library, did the method of loading the plugin change? This is from LLVM/clang 16, built with

```cmake
CMAKE_ARGS -DLLVM_TARGETS_TO_BUILD:STRING=host
-DLLVM_ENABLE_PROJECTS:STRING=clang|clang-tools-extra|lld
-DLLVM_ENABLE_PLUGINS=ON
-DCMAKE_BUILD_TYPE=Release
-DLLVM_ENABLE_PLUGINS=ON
-DLLVM_ENABLE_ASSERTIONS=ON
-DLLVM_ENABLE_RUNTIMES:STRING=libcxx|libcxxabi
-DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_SOURCE_DIR}/build
-DDEFAULT_SYSROOT=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.