Skip to content

Commit 727d806

Browse files
authored
Merge pull request #957 from MaxDesiatov/maxd/revert-static
Revert "Always build static library for WASM"
2 parents 114ccfe + 2892a51 commit 727d806

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed

lib/Driver/Driver.cpp

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1451,18 +1451,13 @@ void Driver::buildOutputInfo(const ToolChain &TC, const DerivedArgList &Args,
14511451
OI.CompilerOutputType = file_types::TY_Object;
14521452
break;
14531453

1454-
case options::OPT_emit_library: {
1455-
// WebAssembly only support static library
1456-
if (TC.getTriple().isOSBinFormatWasm()) {
1457-
OI.LinkAction = LinkKind::StaticLibrary;
1458-
} else {
1459-
OI.LinkAction = Args.hasArg(options::OPT_static) ?
1460-
LinkKind::StaticLibrary :
1461-
LinkKind::DynamicLibrary;
1462-
}
1454+
case options::OPT_emit_library:
1455+
OI.LinkAction = Args.hasArg(options::OPT_static) ?
1456+
LinkKind::StaticLibrary :
1457+
LinkKind::DynamicLibrary;
14631458
OI.CompilerOutputType = file_types::TY_Object;
14641459
break;
1465-
}
1460+
14661461
case options::OPT_static:
14671462
break;
14681463

0 commit comments

Comments
 (0)