@@ -1567,24 +1567,14 @@ toolchains::Windows::constructInvocation(const LinkJobAction &job,
1567
1567
Arguments.push_back (context.Args .MakeArgString (Target));
1568
1568
}
1569
1569
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 );
1574
-
1575
1570
SmallString<128 > SharedRuntimeLibPath;
1576
1571
getRuntimeLibraryPath (SharedRuntimeLibPath, context.Args , *this );
1577
1572
1578
- SmallString<128 > StaticRuntimeLibPath;
1579
- getRuntimeStaticLibraryPath (StaticRuntimeLibPath, context.Args , *this );
1580
-
1581
1573
// Add the runtime library link path, which is platform-specific and found
1582
1574
// relative to the compiler.
1583
- if (!(staticExecutable || staticStdlib)) {
1584
- Arguments.push_back (" -L" );
1585
- Arguments.push_back (context.Args .MakeArgString (SharedRuntimeLibPath + " /"
1575
+ Arguments.push_back (" -L" );
1576
+ Arguments.push_back (context.Args .MakeArgString (SharedRuntimeLibPath + " /"
1586
1577
+ getTriple ().getArchName ()));
1587
- }
1588
1578
1589
1579
addPrimaryInputsOfType (Arguments, context.Inputs , types::TY_Object);
1590
1580
addInputsOfType (Arguments, context.InputActions , types::TY_Object);
@@ -1603,38 +1593,6 @@ toolchains::Windows::constructInvocation(const LinkJobAction &job,
1603
1593
Arguments.push_back (context.Args .MakeArgString (context.OI .SDKPath ));
1604
1594
}
1605
1595
1606
- // Link the standard library.
1607
- Arguments.push_back (" -L" );
1608
-
1609
- if (staticExecutable) {
1610
- Arguments.push_back (context.Args .MakeArgString (StaticRuntimeLibPath));
1611
-
1612
- SmallString<128 > linkFilePath = StaticRuntimeLibPath;
1613
- llvm::sys::path::append (linkFilePath, " static-executable-args.lnk" );
1614
- auto linkFile = linkFilePath.str ();
1615
-
1616
- if (llvm::sys::fs::is_regular_file (linkFile)) {
1617
- Arguments.push_back (context.Args .MakeArgString (Twine (" @" ) + linkFile));
1618
- } else {
1619
- llvm::report_fatal_error (
1620
- " -static-executable not supported on this platform" );
1621
- }
1622
- } else if (staticStdlib) {
1623
- Arguments.push_back (context.Args .MakeArgString (StaticRuntimeLibPath));
1624
-
1625
- SmallString<128 > linkFilePath = StaticRuntimeLibPath;
1626
- llvm::sys::path::append (linkFilePath, " static-stdlib-args.lnk" );
1627
- auto linkFile = linkFilePath.str ();
1628
- if (llvm::sys::fs::is_regular_file (linkFile)) {
1629
- Arguments.push_back (context.Args .MakeArgString (Twine (" @" ) + linkFile));
1630
- } else {
1631
- llvm::report_fatal_error (linkFile + " not found" );
1632
- }
1633
- } else {
1634
- Arguments.push_back (
1635
- context.Args .MakeArgString (SharedRuntimeLibPath + " /swiftCore.lib" ));
1636
- }
1637
-
1638
1596
if (job.getKind () == LinkKind::Executable) {
1639
1597
if (context.OI .SelectedSanitizers & SanitizerKind::Address)
1640
1598
addLinkSanitizerLibArgsForWindows (context.Args , Arguments, " asan" , *this );
0 commit comments