r223219 - Preserve LD_LIBRARY_PATH when using the 'env' command
Hal Finkel
hfinkel at anl.gov
Wed Dec 3 00:19:17 PST 2014
Author: hfinkel
Date: Wed Dec 3 02:19:17 2014
New Revision: 223219
URL: http://llvm.org/viewvc/llvm-project?rev=223219&view=rev
Log:
Preserve LD_LIBRARY_PATH when using the 'env' command
In many Linux environments (and similar), just-built applications won't run
correctly without making use of the current LD_LIBRARY_PATH environmental
variable in order to find dynamic libraries. Propagate it through the 'env'
command (hopefully this works on all platforms).
Modified:
cfe/trunk/test/Driver/env.c
Modified: cfe/trunk/test/Driver/env.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/env.c?rev=223219&r1=223218&r2=223219&view=diff
==============================================================================
--- cfe/trunk/test/Driver/env.c (original)
+++ cfe/trunk/test/Driver/env.c Wed Dec 3 02:19:17 2014
@@ -5,12 +5,14 @@
// REQUIRES: shell
//
// The PATH variable is heavily used when trying to find a linker.
-// RUN: env -i LC_ALL=C %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+// RUN: env -i LC_ALL=C LD_LIBRARY_PATH="$LD_LIBRARY_PATH" \
+// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
// RUN: --target=i386-unknown-linux \
// RUN: --sysroot=%S/Inputs/basic_linux_tree \
// RUN: | FileCheck --check-prefix=CHECK-LD-32 %s
//
-// RUN: env -i LC_ALL=C PATH="" %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+// RUN: env -i LC_ALL=C PATH="" LD_LIBRARY_PATH="$LD_LIBRARY_PATH" \
+// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
// RUN: --target=i386-unknown-linux \
// RUN: --sysroot=%S/Inputs/basic_linux_tree \
// RUN: | FileCheck --check-prefix=CHECK-LD-32 %s
More information about the cfe-commits
mailing list