Skip to content

Commit b801031

Browse files
committed
Merge remote-tracking branch 'origin/master' into master-next
2 parents d2b60f9 + 123f4b9 commit b801031

16 files changed

+73
-41
lines changed

lib/Driver/UnixToolChains.cpp

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -158,15 +158,29 @@ toolchains::GenericUnix::constructInvocation(const DynamicLinkJobAction &job,
158158
}
159159

160160
// Configure the toolchain.
161-
// By default, use the system clang++ to link.
162-
const char *Clang = "clang++";
161+
//
162+
// By default use the system `clang` to perform the link. We use `clang` for
163+
// the driver here because we do not wish to select a particular C++ runtime.
164+
// Furthermore, until C++ interop is enabled, we cannot have a dependency on
165+
// C++ code from pure Swift code. If linked libraries are C++ based, they
166+
// should properly link C++. In the case of static linking, the user can
167+
// explicitly specify the C++ runtime to link against. This is particularly
168+
// important for platforms like android where as it is a Linux platform, the
169+
// default C++ runtime is `libstdc++` which is unsupported on the target but
170+
// as the builds are usually cross-compiled from Linux, libstdc++ is going to
171+
// be present. This results in linking the wrong version of libstdc++
172+
// generating invalid binaries. It is also possible to use different C++
173+
// runtimes than the default C++ runtime for the platform (e.g. libc++ on
174+
// Windows rather than msvcprt). When C++ interop is enabled, we will need to
175+
// surface this via a driver flag. For now, opt for the simpler approach of
176+
// just using `clang` and avoid a dependency on the C++ runtime.
177+
const char *Clang = "clang";
163178
if (const Arg *A = context.Args.getLastArg(options::OPT_tools_directory)) {
164179
StringRef toolchainPath(A->getValue());
165180

166181
// If there is a clang in the toolchain folder, use that instead.
167-
if (auto toolchainClang =
168-
llvm::sys::findProgramByName("clang++", {toolchainPath})) {
169-
Clang = context.Args.MakeArgString(toolchainClang.get());
182+
if (auto tool = llvm::sys::findProgramByName("clang", {toolchainPath})) {
183+
Clang = context.Args.MakeArgString(tool.get());
170184
}
171185

172186
// Look for binutils in the toolchain folder.

lib/Driver/WindowsToolChains.cpp

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,15 +79,29 @@ toolchains::Windows::constructInvocation(const DynamicLinkJobAction &job,
7979
}
8080

8181
// Configure the toolchain.
82-
// By default, use the system clang++ to link.
83-
const char *Clang = "clang++";
82+
//
83+
// By default use the system `clang` to perform the link. We use `clang` for
84+
// the driver here because we do not wish to select a particular C++ runtime.
85+
// Furthermore, until C++ interop is enabled, we cannot have a dependency on
86+
// C++ code from pure Swift code. If linked libraries are C++ based, they
87+
// should properly link C++. In the case of static linking, the user can
88+
// explicitly specify the C++ runtime to link against. This is particularly
89+
// important for platforms like android where as it is a Linux platform, the
90+
// default C++ runtime is `libstdc++` which is unsupported on the target but
91+
// as the builds are usually cross-compiled from Linux, libstdc++ is going to
92+
// be present. This results in linking the wrong version of libstdc++
93+
// generating invalid binaries. It is also possible to use different C++
94+
// runtimes than the default C++ runtime for the platform (e.g. libc++ on
95+
// Windows rather than msvcprt). When C++ interop is enabled, we will need to
96+
// surface this via a driver flag. For now, opt for the simpler approach of
97+
// just using `clang` and avoid a dependency on the C++ runtime.
98+
const char *Clang = "clang";
8499
if (const Arg *A = context.Args.getLastArg(options::OPT_tools_directory)) {
85100
StringRef toolchainPath(A->getValue());
86101

87102
// If there is a clang in the toolchain folder, use that instead.
88-
if (auto toolchainClang =
89-
llvm::sys::findProgramByName("clang++", {toolchainPath}))
90-
Clang = context.Args.MakeArgString(toolchainClang.get());
103+
if (auto tool = llvm::sys::findProgramByName("clang", {toolchainPath}))
104+
Clang = context.Args.MakeArgString(tool.get());
91105
}
92106

93107
std::string Target = getTriple().str();

test/Driver/embed-bitcode.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44
// CHECK-macho: "ld", inputs: ["[[OBJECT]]"], output: {image: "embed-bitcode"}
55
// CHECK-coff: "swiftc.EXE", inputs: ["{{.*}}embed-bitcode.swift"], output: {llvm-bc: "[[BC:.*\.bc]]"}
66
// CHECK-coff: "swiftc.EXE", inputs: ["[[BC]]"], output: {object: "[[OBJECT:.*\.o]]"}
7-
// CHECK-coff: "clang++.exe", inputs: ["[[OBJECT]]"], output: {image: "embed-bitcode"}
7+
// CHECK-coff: "clang.exe", inputs: ["[[OBJECT]]"], output: {image: "embed-bitcode"}
88

99
// CHECK-elf: "swift", inputs: ["{{.*}}embed-bitcode.swift"], output: {llvm-bc: "[[BC:.*\.bc]]"}
1010
// CHECK-elf: "swift", inputs: ["[[BC]]"], output: {object: "[[OBJECT:.*\.o]]"}
1111
// CHECK-elf: "swift-autolink-extract", inputs: ["[[OBJECT]]"], output: {autolink: "[[AUTOLINK:.*\.autolink]]"}
12-
// CHECK-elf: "clang++", inputs: ["[[OBJECT]]", "[[AUTOLINK]]"], output: {image: "main"}
12+
// CHECK-elf: "clang", inputs: ["[[OBJECT]]", "[[AUTOLINK]]"], output: {image: "main"}
1313

1414
// RUN: %target-swiftc_driver -embed-bitcode %s 2>&1 -### | %FileCheck %s -check-prefix=CHECK-FRONT -check-prefix=CHECK-FRONT-%target-object-format
1515
// CHECK-FRONT: -frontend

test/Driver/linker-autolink-extract.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
// DEBUG_LINUX-NEXT: bin/swift-autolink-extract
77
// DEBUG_LINUX-NEXT: bin/swift
88
// DEBUG_LINUX-NEXT: bin/swift -modulewrap
9-
// DEBUG_LINUX-NEXT: bin/clang++{{"? }}
9+
// DEBUG_LINUX-NEXT: bin/clang{{"? }}
1010
// DEBUG_LINUX: -o main
1111
// DEBUG_LINUX-NOT: dsymutil
1212

test/Driver/linker.swift

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@
147147
// LINUX-x86_64: swift
148148
// LINUX-x86_64: -o [[OBJECTFILE:.*]]
149149

150-
// LINUX-x86_64: clang++{{(\.exe)?"? }}
150+
// LINUX-x86_64: clang{{(\.exe)?"? }}
151151
// LINUX-x86_64-DAG: -pie
152152
// LINUX-x86_64-DAG: [[OBJECTFILE]]
153153
// LINUX-x86_64-DAG: -lswiftCore
@@ -163,7 +163,7 @@
163163
// LINUX-armv6: swift
164164
// LINUX-armv6: -o [[OBJECTFILE:.*]]
165165

166-
// LINUX-armv6: clang++{{(\.exe)?"? }}
166+
// LINUX-armv6: clang{{(\.exe)?"? }}
167167
// LINUX-armv6-DAG: -pie
168168
// LINUX-armv6-DAG: [[OBJECTFILE]]
169169
// LINUX-armv6-DAG: -lswiftCore
@@ -180,7 +180,7 @@
180180
// LINUX-armv7: swift
181181
// LINUX-armv7: -o [[OBJECTFILE:.*]]
182182

183-
// LINUX-armv7: clang++{{(\.exe)?"? }}
183+
// LINUX-armv7: clang{{(\.exe)?"? }}
184184
// LINUX-armv7-DAG: -pie
185185
// LINUX-armv7-DAG: [[OBJECTFILE]]
186186
// LINUX-armv7-DAG: -lswiftCore
@@ -197,7 +197,7 @@
197197
// LINUX-thumbv7: swift
198198
// LINUX-thumbv7: -o [[OBJECTFILE:.*]]
199199

200-
// LINUX-thumbv7: clang++{{(\.exe)?"? }}
200+
// LINUX-thumbv7: clang{{(\.exe)?"? }}
201201
// LINUX-thumbv7-DAG: -pie
202202
// LINUX-thumbv7-DAG: [[OBJECTFILE]]
203203
// LINUX-thumbv7-DAG: -lswiftCore
@@ -214,7 +214,7 @@
214214
// ANDROID-armv7: swift
215215
// ANDROID-armv7: -o [[OBJECTFILE:.*]]
216216

217-
// ANDROID-armv7: clang++{{(\.exe)?"? }}
217+
// ANDROID-armv7: clang{{(\.exe)?"? }}
218218
// ANDROID-armv7-DAG: -pie
219219
// ANDROID-armv7-DAG: [[OBJECTFILE]]
220220
// ANDROID-armv7-DAG: -lswiftCore
@@ -231,7 +231,7 @@
231231
// CYGWIN-x86_64: swift
232232
// CYGWIN-x86_64: -o [[OBJECTFILE:.*]]
233233

234-
// CYGWIN-x86_64: clang++{{(\.exe)?"? }}
234+
// CYGWIN-x86_64: clang{{(\.exe)?"? }}
235235
// CYGWIN-x86_64-DAG: [[OBJECTFILE]]
236236
// CYGWIN-x86_64-DAG: -lswiftCore
237237
// CYGWIN-x86_64-DAG: -L [[STDLIB_PATH:[^ ]+(/|\\\\)lib(/|\\\\)swift]]
@@ -246,7 +246,7 @@
246246
// WINDOWS-x86_64: swift
247247
// WINDOWS-x86_64: -o [[OBJECTFILE:.*]]
248248

249-
// WINDOWS-x86_64: clang++{{(\.exe)?"? }}
249+
// WINDOWS-x86_64: clang{{(\.exe)?"? }}
250250
// WINDOWS-x86_64-DAG: [[OBJECTFILE]]
251251
// WINDOWS-x86_64-DAG: -L [[STDLIB_PATH:[^ ]+(/|\\\\)lib(/|\\\\)swift(/|\\\\)windows(/|\\\\)x86_64]]
252252
// WINDOWS-x86_64-DAG: -F foo -iframework car -F cdr
@@ -272,7 +272,7 @@
272272
// LINUX_DYNLIB-x86_64: -o [[OBJECTFILE:.*]]
273273
// LINUX_DYNLIB-x86_64: -o {{"?}}[[AUTOLINKFILE:.*]]
274274

275-
// LINUX_DYNLIB-x86_64: clang++{{(\.exe)?"? }}
275+
// LINUX_DYNLIB-x86_64: clang{{(\.exe)?"? }}
276276
// LINUX_DYNLIB-x86_64-DAG: -shared
277277
// LINUX_DYNLIB-x86_64-DAG: -fuse-ld=gold
278278
// LINUX_DYNLIB-x86_64-NOT: -pie
@@ -297,7 +297,7 @@
297297
// LINUX-linker-order: swift
298298
// LINUX-linker-order: -o [[OBJECTFILE:.*]]
299299

300-
// LINUX-linker-order: clang++{{(\.exe)?"? }}
300+
// LINUX-linker-order: clang{{(\.exe)?"? }}
301301
// LINUX-linker-order: -Xlinker -rpath -Xlinker {{[^ ]+(/|\\\\)lib(/|\\\\)swift(/|\\\\)linux}}
302302
// LINUX-linker-order: -L foo
303303
// LINUX-linker-order: -Xlinker -rpath -Xlinker customrpath
@@ -306,14 +306,14 @@
306306
// LINUX-clang-linker-order: swift
307307
// LINUX-clang-linker-order: -o [[OBJECTFILE:.*]]
308308

309-
// LINUX-clang-linker-order: clang++{{"? }}
309+
// LINUX-clang-linker-order: clang{{"? }}
310310
// LINUX-clang-linker-order: -foo foopath
311311
// LINUX-clang-linker-order: -o {{.*}}
312312

313313
// WINDOWS-clang-linker-order: swift
314314
// WINDOWS-clang-linker-order: -o [[OBJECTFILE:.*]]
315315

316-
// WINDOWS-clang-linker-order: clang++{{"? }}
316+
// WINDOWS-clang-linker-order: clang{{"? }}
317317
// WINDOWS-clang-linker-order: -foo foopath
318318
// WINDOWS-clang-linker-order: -o {{.*}}
319319

test/Driver/modulewrap.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
// CHECK: bin{{/|\\\\}}swift{{c?(\.EXE)?"?}} {{.*}}-emit-module [[MOD]]
55
// CHECK-SAME: -o [[MERGED:.*\.swiftmodule]]
66
// CHECK: bin{{/|\\\\}}swift{{c?(\.EXE)?"?}} -modulewrap [[MERGED]]{{"?}} -target x86_64-unknown-linux-gnu -o [[OBJ:.*\.o]]
7-
// CHECK: bin{{/|\\\\}}clang++{{.*}} [[OBJ]]
7+
// CHECK: bin{{/|\\\\}}clang{{.*}} [[OBJ]]

test/Driver/multi-threaded.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,27 +25,27 @@
2525
// MODULE-DAG: -num-threads 4
2626
// MODULE-DAG: {{[^ ]*[/\\]}}Inputs{{/|\\\\}}main.swift{{"?}} {{[^ ]*[/\\]}}multi-threaded.swift
2727
// MODULE-DAG: -o test.swiftmodule
28-
// MODULE-NOT: {{ld|clang\+\+}}
28+
// MODULE-NOT: {{ld|clang}}
2929

3030
// ASSEMBLY: -frontend
3131
// ASSEMBLY-DAG: -num-threads 4
3232
// ASSEMBLY-DAG: {{[^ ]*[/\\]}}Inputs{{/|\\\\}}main.swift{{"?}} {{[^ ]*[/\\]}}multi-threaded.swift
3333
// ASSEMBLY-DAG: -o /build/main.s -o /build/multi-threaded.s
34-
// ASSEMBLY-NOT: {{ld|clang\+\+}}
34+
// ASSEMBLY-NOT: {{ld|clang}}
3535

3636
// OBJECT: -frontend
3737
// OBJECT-DAG: -num-threads 4
3838
// OBJECT-DAG: {{[^ ]*[/\\]}}Inputs{{/|\\\\}}main.swift{{"?}} {{[^ ]*[/\\]}}multi-threaded.swift
3939
// OBJECT-DAG: -o main.o -o multi-threaded.o
40-
// OBJECT-NOT: {{ld|clang\+\+}}
40+
// OBJECT-NOT: {{ld|clang}}
4141

4242
// BITCODE: -frontend
4343
// BITCODE-DAG: -num-threads 4
4444
// BITCODE-DAG: {{[^ ]*[/\\]}}Inputs{{/|\\\\}}main.swift{{"?}} {{[^ ]*[/\\]}}multi-threaded.swift
4545
// BITCODE-DAG: -o {{.*[/\\]}}main.bc -o {{.*[/\\]}}multi-threaded.bc
4646
// BITCODE-DAG: -frontend -c -primary-file {{.*[/\\]}}main.bc {{.*}} -o {{[^ ]*}}main.o
4747
// BITCODE-DAG: -frontend -c -primary-file {{.*[/\\]}}multi-threaded.bc {{.*}} -o {{[^ ]*}}multi-threaded.o
48-
// BITCODE-NOT: {{ld|clang\+\+}}
48+
// BITCODE-NOT: {{ld|clang}}
4949

5050
// PARSEABLE: "outputs": [
5151
// PARSEABLE: "path": "main.o"
@@ -55,7 +55,7 @@
5555
// EXEC-DAG: -num-threads 4
5656
// EXEC-DAG: {{[^ ]*[/\\]}}Inputs{{/|\\\\}}main.swift{{"?}} {{[^ ]*[/\\]}}multi-threaded.swift
5757
// EXEC-DAG: -o {{.*te?mp.*[/\\]}}main{{[^ ]*}}.o{{"?}} -o {{.*te?mp.*[/\\]}}multi-threaded{{[^ ]*}}.o
58-
// EXEC: {{ld|clang\+\+}}
58+
// EXEC: {{ld|clang}}
5959
// EXEC: {{.*te?mp.*[/\\]}}main{{[^ ]*}}.o{{"?}} {{.*te?mp.*[/\\]}}multi-threaded{{[^ ]*}}.o
6060

6161
// DEPENDENCIES-DAG: {{.*}}multi-threaded.o : {{.*[/\\]}}multi-threaded.swift {{.*[/\\]}}Inputs{{[/\\]}}main.swift

test/Driver/parseable_output.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,8 @@
112112
// CHECK-NEXT: {
113113
// CHECK-NEXT: "kind": "began",
114114
// CHECK-NEXT: "name": "link",
115-
// CHECK-NEXT: "command": "{{.*[\\/](ld|clang\+\+)(\.exe)?(\\")?.*}}parseable_output-[[OUTPUT]].o{{(\\")?}} {{.*}}-o {{.*[\\/]}}parseable_output.swift.tmp.out{{(\\")?}}",
116-
// CHECK-NEXT: "command_executable": "{{.*[\\/](ld|clang\+\+)(\.exe)?}}",
115+
// CHECK-NEXT: "command": "{{.*[\\/](ld|clang)(\.exe)?(\\")?.*}}parseable_output-[[OUTPUT]].o{{(\\")?}} {{.*}}-o {{.*[\\/]}}parseable_output.swift.tmp.out{{(\\")?}}",
116+
// CHECK-NEXT: "command_executable": "{{.*[\\/](ld|clang)(\.exe)?}}",
117117
// CHECK-NEXT: "command_arguments": [
118118
// CHECK: "{{.*[\\/]}}parseable_output-[[OUTPUT]].o",
119119
// CHECK: "-o",

test/Driver/parseable_output_unicode.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,8 @@
114114
// CHECK-NEXT: {
115115
// CHECK-NEXT: "kind": "began",
116116
// CHECK-NEXT: "name": "link",
117-
// CHECK-NEXT: "command": "{{.*[\\/](ld|clang\+\+.exe)(\\")?}} {{.*[\\/]}}你好-[[OUTPUT]].o{{(\\")?}}{{.*}}-o {{.*[\\/]}}parseable_output_unicode.swift.tmp.out{{(\\")?}}",
118-
// CHECK-NEXT: "command_executable": "{{.*[\\/](ld|clang\+\+.exe)(\\")?}}",
117+
// CHECK-NEXT: "command": "{{.*[\\/](ld|clang.exe)(\\")?}} {{.*[\\/]}}你好-[[OUTPUT]].o{{(\\")?}}{{.*}}-o {{.*[\\/]}}parseable_output_unicode.swift.tmp.out{{(\\")?}}",
118+
// CHECK-NEXT: "command_executable": "{{.*[\\/](ld|clang.exe)(\\")?}}",
119119
// CHECK-NEXT: "command_arguments": [
120120
// CHECK: "{{.*[\\/]}}你好-[[OUTPUT]].o",
121121
// CHECK: "-o",

test/Driver/profiling.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,11 @@
4444
// watchOS_SIM: {{(bin/)?ld(.exe)?"? }}
4545
// watchOS_SIM: lib{{(\\\\|/)}}swift{{(\\\\|/)}}clang{{(\\\\|/)}}lib{{(\\\\|/)}}darwin{{(\\\\|/)}}libclang_rt.profile_watchossim.a
4646

47-
// LINUX: clang++{{(\.exe)?"? }}
47+
// LINUX: clang{{(\.exe)?"? }}
4848
// LINUX: lib{{(\\\\|/)}}swift{{(\\\\|/)}}clang{{(\\\\|/)}}lib{{(\\\\|/)}}linux{{(\\\\|/)}}libclang_rt.profile-x86_64.a
4949
// LINUX: -u__llvm_profile_runtime
5050

51-
// WINDOWS: clang++{{(\.exe)?"? }}
51+
// WINDOWS: clang{{(\.exe)?"? }}
5252
// WINDOWS: lib{{(\\\\|/)}}swift{{(\\\\|/)}}clang{{(\\\\|/)}}lib{{(\\\\|/)}}windows{{(\\\\|/)}}clang_rt.profile-x86_64.lib
5353
// WINDOWS: -u__llvm_profile_runtime
5454

test/Driver/tools_directory.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//=================================================
2-
// ** GENERIC UNIX TARGETS - linking via clang++ **
2+
// ** GENERIC UNIX TARGETS - linking via clang **
33
//=================================================
44

55
// RUN: %swiftc_driver -### -target x86_64-linux-unknown -tools-directory %S/Inputs/fake-toolchain %s 2>&1 | %FileCheck -check-prefix CLANGSUB %s
@@ -9,7 +9,7 @@
99
// CLANGSUB-SAME: -o [[OBJECTFILE:.*]]
1010
// CLANGSUB: swift-autolink-extract{{(\.exe)?"?}} [[OBJECTFILE]]
1111
// CLANGSUB-SAME: -o {{"?}}[[AUTOLINKFILE:.*]]
12-
// CLANGSUB: {{[^ ]+(\\\\|/)}}Inputs{{/|\\\\}}fake-toolchain{{/|\\\\}}clang++
12+
// CLANGSUB: {{[^ ]+(\\\\|/)}}Inputs{{/|\\\\}}fake-toolchain{{/|\\\\}}clang
1313
// CLANGSUB-DAG: [[OBJECTFILE]]
1414
// CLANGSUB-DAG: @[[AUTOLINKFILE]]
1515
// CLANGSUB: -o tools_directory
@@ -18,7 +18,7 @@
1818
// BINUTILS-SAME: -o [[OBJECTFILE:.*]]
1919
// BINUTILS: swift-autolink-extract{{(\.exe)?"?}} [[OBJECTFILE]]
2020
// BINUTILS-SAME: -o {{"?}}[[AUTOLINKFILE:.*]]
21-
// BINUTILS: clang++
21+
// BINUTILS: clang
2222
// BINUTILS-DAG: [[OBJECTFILE]]
2323
// BINUTILS-DAG: @[[AUTOLINKFILE]]
2424
// BINUTILS-DAG: -B /Something/obviously/fake

test/Driver/verbose.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
// RUN: %swiftc_driver -driver-print-jobs -target x86_64-unknown-linux-gnu -v %s 2>&1 | %FileCheck %s -check-prefix=VERBOSE_CLANG
22
// RUN: %swiftc_driver -driver-print-jobs -target x86_64-unknown-windows-msvc -v %s 2>&1 | %FileCheck %s -check-prefix=VERBOSE_CLANG
33

4-
// VERBOSE_CLANG: clang++{{.*}} -v -o
4+
// VERBOSE_CLANG: clang{{.*}} -v -o

test/Driver/windows-link-job.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
// RUN: %empty-directory(%t/DISTINCTIVE-WINDOWS-PATH/usr/bin)
22
// RUN: %hardlink-or-copy(from: %swift_driver_plain, to: %t/DISTINCTIVE-WINDOWS-PATH/usr/bin/swiftc)
33
// RUN: env PATH= %t/DISTINCTIVE-WINDOWS-PATH/usr/bin/swiftc -target x86_64-unknown-windows-msvc -### -module-name link -emit-library %s 2>&1 | %FileCheck %s
4-
// CHECK: {{^}}clang++
4+
// CHECK: {{^}}clang

utils/gen-static-stdlib-link-args

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ function write_linkfile {
6666
-latomic
6767
-lswiftImageInspectionShared
6868
$ICU_LIBS
69+
-lstdc++
70+
-lm
6971
-Xlinker
7072
-export-dynamic
7173
-Xlinker

utils/static-executable-args.lnk

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,5 @@
1313
-licuuc
1414
-licudata
1515
-ldl
16+
-lstdc++
17+
-lm

0 commit comments

Comments
 (0)