Skip to content

Commit 8983a7e

Browse files
committed
[android] Do not link library absolute path.
Avoid using the full path of the shared library to avoid including the absolute path of the library in the executable, which will not work once the library is moved to the host machine (like an Android device). To avoid doing a confussing `-lrary`, I changed the name of the library to `libAttrImplFP.so` instead.
1 parent c3a9498 commit 8983a7e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test/attr/attr_implements_serial.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
// RUN: %empty-directory(%t)
22
// RUN: echo 'client()' >%t/main.swift
3-
// RUN: %target-build-swift-dylib(%t/library.%target-dylib-extension) -module-name AttrImplFP -emit-module -emit-module-path %t/AttrImplFP.swiftmodule %S/attr_implements_fp.swift
4-
// RUN: %target-build-swift -I %t -o %t/a.out %s %t/main.swift %t/library.%target-dylib-extension
3+
// RUN: %target-build-swift-dylib(%t/libAttrImplFP.%target-dylib-extension) -module-name AttrImplFP -emit-module -emit-module-path %t/AttrImplFP.swiftmodule %S/attr_implements_fp.swift
4+
// RUN: %target-build-swift -I %t -o %t/a.out %s %t/main.swift -L %t -Xlinker -rpath -Xlinker %t -lAttrImplFP
55
// RUN: %target-codesign %t/a.out
6-
// RUN: %target-codesign %t/library.%target-dylib-extension
7-
// RUN: %target-run %t/a.out %t/library.%target-dylib-extension | %FileCheck %s
6+
// RUN: %target-codesign %t/libAttrImplFP.%target-dylib-extension
7+
// RUN: %target-run %t/a.out %t/libAttrImplFP.%target-dylib-extension | %FileCheck %s
88
// REQUIRES: executable_test
99

1010
// This test just checks that the lookup-table entries for @_implements are

0 commit comments

Comments
 (0)