Skip to content

Commit 9b9541c

Browse files
committed
Work around ElementaryFunctions linker error on Ubuntu.
TF-892 tracks fixing the issue.
1 parent ac17a00 commit 9b9541c

File tree

1 file changed

+2
-1
lines changed
  • test/AutoDiff/differentiable_attr_cross_module

1 file changed

+2
-1
lines changed

test/AutoDiff/differentiable_attr_cross_module/main.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
// modules.
33

44
// RUN: %empty-directory(%t)
5-
// RUN: %target-build-swift %S/../Inputs/differentiable_attr_other_module.swift %s -o /dev/null
5+
// RUN: %target-build-swift %S/../Inputs/differentiable_attr_other_module.swift %s -o /dev/null -lm
6+
// NOTE(TF-892): `-lm` is necessary to prevent linker errors related to `ElementaryFunctions` on Ubuntu.
67

78
@differentiable(wrt: x)
89
func testInitializer(_ x: Float) -> Float {

0 commit comments

Comments
 (0)