summaryrefslogtreecommitdiffstats
path: root/llvm/test/LibDriver
diff options
context:
space:
mode:
authorPeter Collingbourne <peter@pcc.me.uk>2015-07-08 19:00:46 +0000
committerPeter Collingbourne <peter@pcc.me.uk>2015-07-08 19:00:46 +0000
commit7a544f7327a4b158913a1bbe40b039f6bb7d8d86 (patch)
treec11274abac97a0e49309a07a1b84d08a0ebf8e0a /llvm/test/LibDriver
parent3d5b610c864c8f5980eaa16c22b71ff1cf462fae (diff)
downloadbcm5719-llvm-7a544f7327a4b158913a1bbe40b039f6bb7d8d86.tar.gz
bcm5719-llvm-7a544f7327a4b158913a1bbe40b039f6bb7d8d86.zip
LibDriver: Fix output path inference.
The inferred output file name is based on the first input file, not the first one with extension .obj. The output file was also being written to the wrong directory; it needs to be written to whichever directory on the libpath it was found in. This change fixes both issues. llvm-svn: 241710
Diffstat (limited to 'llvm/test/LibDriver')
-rw-r--r--llvm/test/LibDriver/infer-output-path.test15
1 files changed, 15 insertions, 0 deletions
diff --git a/llvm/test/LibDriver/infer-output-path.test b/llvm/test/LibDriver/infer-output-path.test
new file mode 100644
index 00000000000..7a1bbcbbd18
--- /dev/null
+++ b/llvm/test/LibDriver/infer-output-path.test
@@ -0,0 +1,15 @@
+RUN: llvm-mc -triple=x86_64-pc-windows-msvc -filetype=obj -o %T/a.obj %S/Inputs/a.s
+RUN: llvm-mc -triple=x86_64-pc-windows-msvc -filetype=obj -o %T/b.o %S/Inputs/b.s
+RUN: llvm-mc -triple=x86_64-pc-windows-msvc -filetype=obj -o %T/c %S/Inputs/b.s
+
+RUN: rm -f %T/a.lib
+RUN: llvm-lib %T/a.obj
+RUN: test -e %T/a.lib
+
+RUN: rm -f %T/b.lib
+RUN: llvm-lib /libpath:%T b.o
+RUN: test -e %T/b.lib
+
+RUN: rm -f %T/c.lib
+RUN: llvm-lib /libpath:%T c
+RUN: test -e %T/c.lib
OpenPOWER on IntegriCloud