From 2892a513e46856bb05f22fed4b27bf35155a6dd6 Mon Sep 17 00:00:00 2001 From: Max Desiatov Date: Mon, 11 May 2020 21:09:57 +0100 Subject: [PATCH] Revert "[WASM] Always build static library for WASM" This reverts commit 60d5dbd97ad04a963a3f7a5ede51b21daea66f03. --- lib/Driver/Driver.cpp | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/lib/Driver/Driver.cpp b/lib/Driver/Driver.cpp index b46c140a37b9c..54148ce2c7620 100644 --- a/lib/Driver/Driver.cpp +++ b/lib/Driver/Driver.cpp @@ -1451,18 +1451,13 @@ void Driver::buildOutputInfo(const ToolChain &TC, const DerivedArgList &Args, OI.CompilerOutputType = file_types::TY_Object; break; - case options::OPT_emit_library: { - // WebAssembly only support static library - if (TC.getTriple().isOSBinFormatWasm()) { - OI.LinkAction = LinkKind::StaticLibrary; - } else { - OI.LinkAction = Args.hasArg(options::OPT_static) ? - LinkKind::StaticLibrary : - LinkKind::DynamicLibrary; - } + case options::OPT_emit_library: + OI.LinkAction = Args.hasArg(options::OPT_static) ? + LinkKind::StaticLibrary : + LinkKind::DynamicLibrary; OI.CompilerOutputType = file_types::TY_Object; break; - } + case options::OPT_static: break;