Index: cfe/trunk/lib/Driver/ToolChains/WebAssembly.cpp =================================================================== --- cfe/trunk/lib/Driver/ToolChains/WebAssembly.cpp +++ cfe/trunk/lib/Driver/ToolChains/WebAssembly.cpp @@ -42,7 +42,7 @@ const char *Linker = Args.MakeArgString(ToolChain.GetLinkerPath()); ArgStringList CmdArgs; CmdArgs.push_back("-flavor"); - CmdArgs.push_back("ld"); + CmdArgs.push_back("wasm"); // Enable garbage collection of unused input sections by default, since code // size is of particular importance. This is significantly facilitated by @@ -101,6 +101,9 @@ : ToolChain(D, Triple, Args) { assert(Triple.isArch32Bit() != Triple.isArch64Bit()); + + getProgramPaths().push_back(getDriver().getInstalledDir()); + getFilePaths().push_back( getDriver().SysRoot + "/lib" + (Triple.isArch32Bit() ? "32" : "64")); }