Skip to content

Commit c5a29ec

Browse files
authored
Quick fix to also include -ltensorflow when compiling against TensorFlow this way users do not need to compile against tensorflow always. (#21784)
1 parent a80111e commit c5a29ec

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/Driver/UnixToolChains.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,8 +312,10 @@ toolchains::GenericUnix::constructInvocation(const LinkJobAction &job,
312312

313313
SmallString<128> swiftTensorFlowLibPath = SharedRuntimeLibPath;
314314
llvm::sys::path::append(swiftTensorFlowLibPath, "libswiftTensorFlow.so");
315-
if (llvm::sys::fs::exists(swiftTensorFlowLibPath))
315+
if (llvm::sys::fs::exists(swiftTensorFlowLibPath)) {
316316
Arguments.push_back("-lswiftTensorFlow");
317+
Arguments.push_back("-ltensorflow");
318+
}
317319
}
318320

319321
// Explicitly pass the target to the linker

0 commit comments

Comments
 (0)