@@ -1114,7 +1114,7 @@ getSanitizerRuntimeLibNameForDarwin(StringRef Sanitizer,
1114
1114
}
1115
1115
1116
1116
static std::string getSanitizerRuntimeLibNameForWindows (
1117
- StringRef Sanitizer, const llvm::Triple &Triple, bool shared = true ) {
1117
+ StringRef Sanitizer, const llvm::Triple &Triple) {
1118
1118
return (Twine (" clang_rt." ) + Sanitizer + " -" + Triple.getArchName () + " .lib" )
1119
1119
.str ();
1120
1120
}
@@ -1225,14 +1225,10 @@ addLinkSanitizerLibArgsForDarwin(const ArgList &Args,
1225
1225
static void addLinkSanitizerLibArgsForWindows (const ArgList &Args,
1226
1226
ArgStringList &Arguments,
1227
1227
StringRef Sanitizer,
1228
- const ToolChain &TC,
1229
- bool shared = true ) {
1230
- // Sanitizer runtime libraries requires C++.
1231
- Arguments.push_back (" -lc++" );
1232
-
1228
+ const ToolChain &TC) {
1233
1229
addLinkRuntimeLibForWindows (
1234
1230
Args, Arguments,
1235
- getSanitizerRuntimeLibNameForWindows (Sanitizer, TC.getTriple (), shared ),
1231
+ getSanitizerRuntimeLibNameForWindows (Sanitizer, TC.getTriple ()),
1236
1232
TC);
1237
1233
}
1238
1234
@@ -1571,16 +1567,10 @@ toolchains::Windows::constructInvocation(const LinkJobAction &job,
1571
1567
Arguments.push_back (context.Args .MakeArgString (Target));
1572
1568
}
1573
1569
1574
- bool staticExecutable = false ;
1575
- bool staticStdlib = false ;
1576
-
1577
- if (context.Args .hasFlag (options::OPT_static_executable,
1578
- options::OPT_no_static_executable, false )) {
1579
- staticExecutable = true ;
1580
- } else if (context.Args .hasFlag (options::OPT_static_stdlib,
1581
- options::OPT_no_static_stdlib, false )) {
1582
- staticStdlib = true ;
1583
- }
1570
+ bool staticExecutable = context.Args .hasFlag (
1571
+ options::OPT_static_executable, options::OPT_no_static_executable, false );
1572
+ bool staticStdlib = context.Args .hasFlag (
1573
+ options::OPT_static_stdlib, options::OPT_no_static_stdlib, false );
1584
1574
1585
1575
SmallString<128 > SharedRuntimeLibPath;
1586
1576
getRuntimeLibraryPath (SharedRuntimeLibPath, context.Args , *this );
0 commit comments