Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions lakefile.lean
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,12 @@ private def nativeLinkArgs : Array String :=
"-lstdc++",
"-Wl,-rpath," ++ s!"{cudaHome}/lib64"
]
else if Platform.isWindows then
else if Platform.isWindows || Platform.isOSX then
-- Windows and macOS provide libm via the default C runtime
#[]
else
-- CPU stubs call functions from `math.h`; CUDA objects are C++ when a checkout switches
-- between CPU and CUDA builds without cleaning `.lake`, so Linux links both runtimes.
-- CPU stubs call functions from `math.h`; Linux keeps these in `libm`.
-- Keep libstdc++ for mixed native objects when switching between CPU and CUDA builds.
#["-lm", "-lstdc++"]

package TorchLean where
Expand Down
Loading