Skip to content

Commit 5b5f547

Browse files
authored
allow for target library linkage via flags (#1279)
Requires changes to libRaise.so plugin
1 parent c1557e5 commit 5b5f547

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/enzyme_ad/jax/raise.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@
3030

3131
extern "C" std::string runLLVMToMLIRRoundTrip(std::string input,
3232
std::string outfile,
33-
std::string backend) {
33+
std::string backend,
34+
std::string library) {
3435
llvm::LLVMContext Context;
3536
Context.setDiscardValueNames(false);
3637
llvm::SMDiagnostic Err;
@@ -118,6 +119,11 @@ extern "C" std::string runLLVMToMLIRRoundTrip(std::string input,
118119
pass_pipeline += "},strip-"
119120
"gpu-info,gpu-"
120121
"module-to-binary";
122+
if (!library.empty()) {
123+
pass_pipeline += "{l=";
124+
pass_pipeline += library;
125+
pass_pipeline += "}";
126+
}
121127
}
122128

123129
// clang-format on

0 commit comments

Comments
 (0)