Skip to content

Commit 1a5863b

Browse files
committed
---
yaml --- r: 348623 b: refs/heads/master c: f437e14 h: refs/heads/master i: 348621: 9a7ee57 348619: 486ba7f 348615: d065364 348607: 4046c33
1 parent c382053 commit 1a5863b

File tree

4 files changed

+10
-2
lines changed

4 files changed

+10
-2
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 78ff7eae0f0763f417e6db93a2d479e938e009e3
2+
refs/heads/master: f437e14720b85b42dcaaf34e9345210f5e45c810
33
refs/heads/master-next: 203b3026584ecad859eb328b2e12490099409cd5
44
refs/tags/osx-passed: b6b74147ef8a386f532cf9357a1bde006e552c54
55
refs/tags/swift-2.2-SNAPSHOT-2015-12-01-a: 6bb18e013c2284f2b45f5f84f2df2887dc0f7dea

trunk/include/swift/Option/Options.td

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -508,6 +508,9 @@ def no_static_stdlib: Flag<["-"], "no-static-stdlib">,
508508
def toolchain_stdlib_rpath: Flag<["-"], "toolchain-stdlib-rpath">,
509509
Flags<[HelpHidden,DoesNotAffectIncrementalBuild]>,
510510
HelpText<"Add an rpath entry for the toolchain's standard library, rather than the OS's">;
511+
def no_toolchain_stdlib_rpath: Flag<["-"], "no-toolchain-stdlib-rpath">,
512+
Flags<[HelpHidden,DoesNotAffectIncrementalBuild]>,
513+
HelpText<"Do not add an rpath entry for the toolchain's standard library (default)">;
511514
def no_stdlib_rpath: Flag<["-"], "no-stdlib-rpath">,
512515
Flags<[HelpHidden,DoesNotAffectIncrementalBuild]>,
513516
HelpText<"Don't add any rpath entries.">;

trunk/lib/Driver/DarwinToolChains.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,8 @@ toolchains::Darwin::addArgsToLinkStdlib(ArgStringList &Arguments,
389389
Arguments.push_back(context.Args.MakeArgString(path));
390390
}
391391

392-
if (context.Args.hasArg(options::OPT_toolchain_stdlib_rpath)) {
392+
if (context.Args.hasFlag(options::OPT_toolchain_stdlib_rpath,
393+
options::OPT_no_toolchain_stdlib_rpath, false)) {
393394
// If the user has explicitly asked for a toolchain stdlib, we should
394395
// provide one using -rpath. This used to be the default behaviour but it
395396
// was considered annoying in at least the SwiftPM scenario (see

trunk/test/Driver/linker-rpath.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@
3737
// RUN: %swiftc_driver_plain -driver-print-jobs -toolchain-stdlib-rpath -target x86_64-apple-macosx10.9 %S/../Inputs/empty.swift -resource-dir garbage/ | %FileCheck -check-prefix TOOLCHAIN-RPATH -DPLATFORM=%target-sdk-name %s
3838
// RUN: %swiftc_driver_plain -driver-print-jobs -toolchain-stdlib-rpath -target x86_64-apple-macosx10.15 %S/../Inputs/empty.swift -resource-dir garbage/ | %FileCheck -check-prefix TOOLCHAIN-RPATH -DPLATFORM=%target-sdk-name %s
3939

40+
// ### Test with -no-toolchain-stdlib-rpath
41+
// RUN: %swiftc_driver_plain -driver-print-jobs -no-toolchain-stdlib-rpath -target x86_64-apple-macosx10.9 %S/../Inputs/empty.swift | %FileCheck -check-prefix RPATH %s
42+
// RUN: %swiftc_driver_plain -driver-print-jobs -no-toolchain-stdlib-rpath -target x86_64-apple-macosx10.15 %S/../Inputs/empty.swift | %FileCheck -check-prefix NO-RPATH %s
43+
4044
// TOOLCHAIN-RPATH: bin/ld{{"? }}
4145
// TOOLCHAIN-RPATH-SAME: -rpath garbage/[[PLATFORM]]{{ }}
4246
// TOOLCHAIN-RPATH-SAME: -o {{[^ ]+}}

0 commit comments

Comments
 (0)