summaryrefslogtreecommitdiffstats
path: root/lld/test/Driver
diff options
context:
space:
mode:
authorSimon Atanasyan <simon@atanasyan.com>2015-02-26 20:09:50 +0000
committerSimon Atanasyan <simon@atanasyan.com>2015-02-26 20:09:50 +0000
commit82ae48eeb5e79ee9ecf1f6e7d8a433e45cfca4d0 (patch)
treea153b7832ed50cbceb7d8cf1889bfbbd5040faf9 /lld/test/Driver
parent27967c843be0f1215c70fe0970793070e8cdeea3 (diff)
downloadbcm5719-llvm-82ae48eeb5e79ee9ecf1f6e7d8a433e45cfca4d0.tar.gz
bcm5719-llvm-82ae48eeb5e79ee9ecf1f6e7d8a433e45cfca4d0.zip
[Driver] Use paths explicitly provided by the -L option before default paths
User should be able to override default search paths using the -L option. http://reviews.llvm.org/D7902 llvm-svn: 230679
Diffstat (limited to 'lld/test/Driver')
-rw-r--r--lld/test/Driver/Inputs/libtest.a1
-rw-r--r--lld/test/Driver/def-lib-search.test8
2 files changed, 9 insertions, 0 deletions
diff --git a/lld/test/Driver/Inputs/libtest.a b/lld/test/Driver/Inputs/libtest.a
new file mode 100644
index 00000000000..8b277f0dd5d
--- /dev/null
+++ b/lld/test/Driver/Inputs/libtest.a
@@ -0,0 +1 @@
+!<arch>
diff --git a/lld/test/Driver/def-lib-search.test b/lld/test/Driver/def-lib-search.test
new file mode 100644
index 00000000000..818cbfe6ad6
--- /dev/null
+++ b/lld/test/Driver/def-lib-search.test
@@ -0,0 +1,8 @@
+# Check that search paths explicitly provided by the -L option
+# are used in search before default paths.
+
+RUN: not lld -flavor gnu -target x86_64 -t -ltest \
+RUN: --sysroot=%p/Inputs -L%p/Inputs 2> %t
+RUN: FileCheck %s < %t
+
+CHECK: {{[^ ]+}}{{[\\/]}}Inputs{{[\\/]}}libtest.a
OpenPOWER on IntegriCloud