summary refs log tree commit diff stats
path: root/tests/compiler/tcmdlineclib.nims
diff options
context:
space:
mode:
Diffstat (limited to 'tests/compiler/tcmdlineclib.nims')
-rw-r--r--tests/compiler/tcmdlineclib.nims10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/compiler/tcmdlineclib.nims b/tests/compiler/tcmdlineclib.nims
new file mode 100644
index 000000000..f7899d92e
--- /dev/null
+++ b/tests/compiler/tcmdlineclib.nims
@@ -0,0 +1,10 @@
+import os
+
+selfExec "c --app:lib " & (projectDir() / "samplelib.nim")
+switch("clibdir", projectDir())
+--clib:samplelib
+
+# Make test executable can load sample shared library.
+# `-rpath` option doesn't work and ignored on Windows.
+# But the dll file in same directory as executable file is loaded.
+switch("passL", "-Wl,-rpath," & projectDir())