Skip to content

Commit 6fcfbaa

Browse files
authored
Merge pull request #32523 from buttaface/linker
Driver: update old doc comments from when clang++ was the linker driver
2 parents 65da7f6 + e6fe8d4 commit 6fcfbaa

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

docs/Android.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,10 +103,9 @@ $ NDK_PATH="path/to/android-ndk21"
103103
$ build/Ninja-ReleaseAssert/swift-linux-x86_64/bin/swiftc \ # The Swift compiler built in the previous step.
104104
# The location of the tools used to build Android binaries
105105
-tools-directory ${NDK_PATH}/toolchains/llvm/prebuilt/linux-x86_64/bin/ \
106-
-target armv7a-none-linux-androideabi \ # Targeting android-armv7.
107-
-sdk ${NDK_PATH}/platforms/android-21/arch-arm \ # Use the same architecture and API version as you used to build the stdlib in the previous step.
108-
-Xclang-linker -nostdlib++ \ # Don't link libc++, and supply the path to libgcc.
106+
-target armv7a-none-linux-androideabi \ # Targeting android-armv7, and supply the path to libgcc.
109107
-L ${NDK_PATH}/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/lib/gcc/arm-linux-androideabi/4.9.x/armv7-a \
108+
-sdk ${NDK_PATH}/platforms/android-21/arch-arm \ # Use the same architecture and API version as you used to build the stdlib in the previous step.
110109
hello.swift
111110
```
112111

lib/Driver/UnixToolChains.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ toolchains::GenericUnix::constructInvocation(const DynamicLinkJobAction &job,
337337
Twine("-u", llvm::getInstrProfRuntimeHookVarName())));
338338
}
339339

340-
// Run clang++ in verbose mode if "-v" is set
340+
// Run clang in verbose mode if "-v" is set
341341
if (context.Args.hasArg(options::OPT_v)) {
342342
Arguments.push_back("-v");
343343
}

lib/Driver/WindowsToolChains.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ toolchains::Windows::constructInvocation(const DynamicLinkJobAction &job,
112112

113113
// Rely on `-libc` to correctly identify the MSVC Runtime Library. We use
114114
// `-nostartfiles` as that limits the difference to just the
115-
// `-defaultlib:libcmt` which is passed unconditionally with the `clang++`
115+
// `-defaultlib:libcmt` which is passed unconditionally with the `clang`
116116
// driver rather than the `clang-cl` driver.
117117
Arguments.push_back("-nostartfiles");
118118

@@ -186,7 +186,7 @@ toolchains::Windows::constructInvocation(const DynamicLinkJobAction &job,
186186
context.Args.AddAllArgs(Arguments, options::OPT_linker_option_Group);
187187
context.Args.AddAllArgValues(Arguments, options::OPT_Xclang_linker);
188188

189-
// Run clang++ in verbose mode if "-v" is set
189+
// Run clang in verbose mode if "-v" is set
190190
if (context.Args.hasArg(options::OPT_v)) {
191191
Arguments.push_back("-v");
192192
}

0 commit comments

Comments
 (0)