Skip to content

Commit 66dc01b

Browse files
committed
Revert "[Driver] On Apple platforms, add /usr/lib/swift to the beginning of the DYLD_LIBRARY_PATH value in constructInvocation."
This reverts commit acf2c9f.
1 parent dd2fcd1 commit 66dc01b

File tree

2 files changed

+1
-13
lines changed

2 files changed

+1
-13
lines changed

lib/Driver/DarwinToolChains.cpp

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,6 @@ using namespace swift;
3939
using namespace swift::driver;
4040
using namespace llvm::opt;
4141

42-
/// The path for Swift libraries in the OS. (Duplicated from Immediate.cpp.
43-
/// Eventually we should consolidate this.)
44-
#define OS_LIBRARY_PATH "/usr/lib/swift"
45-
4642
std::string
4743
toolchains::Darwin::findProgramRelativeToSwiftImpl(StringRef name) const {
4844
StringRef swiftPath = getDriver().getSwiftProgramPath();
@@ -76,15 +72,12 @@ toolchains::Darwin::constructInvocation(const InterpretJobAction &job,
7672
const JobContext &context) const {
7773
InvocationInfo II = ToolChain::constructInvocation(job, context);
7874

79-
SmallString<128> envValue(OS_LIBRARY_PATH ":");
80-
8175
SmallString<128> runtimeLibraryPath;
8276
getRuntimeLibraryPath(runtimeLibraryPath, context.Args, /*Shared=*/true);
83-
envValue.append(runtimeLibraryPath);
8477

8578
addPathEnvironmentVariableIfNeeded(II.ExtraEnvironment, "DYLD_LIBRARY_PATH",
8679
":", options::OPT_L, context.Args,
87-
envValue);
80+
runtimeLibraryPath);
8881
addPathEnvironmentVariableIfNeeded(II.ExtraEnvironment, "DYLD_FRAMEWORK_PATH",
8982
":", options::OPT_F, context.Args);
9083
// FIXME: Add options::OPT_Fsystem paths to DYLD_FRAMEWORK_PATH as well.

test/Driver/environment-mac.swift

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)