summaryrefslogtreecommitdiff
path: root/lib/Driver/ToolChains/WebAssembly.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2017-05-16 19:47:09 +0000
committerDimitry Andric <dim@FreeBSD.org>2017-05-16 19:47:09 +0000
commit2410013d9382b8129702fa3a3bf19a370ae7afc3 (patch)
treedf038b6418b19d03437950dcee799c1483c6246a /lib/Driver/ToolChains/WebAssembly.cpp
parent0a5fb09b599c1bdea3cd11168bb8f4ff4040316e (diff)
Diffstat (limited to 'lib/Driver/ToolChains/WebAssembly.cpp')
-rw-r--r--lib/Driver/ToolChains/WebAssembly.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Driver/ToolChains/WebAssembly.cpp b/lib/Driver/ToolChains/WebAssembly.cpp
index 123a1516f1e7..3471569b6884 100644
--- a/lib/Driver/ToolChains/WebAssembly.cpp
+++ b/lib/Driver/ToolChains/WebAssembly.cpp
@@ -42,7 +42,7 @@ void wasm::Linker::ConstructJob(Compilation &C, const JobAction &JA,
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 @@ WebAssembly::WebAssembly(const Driver &D, const llvm::Triple &Triple,
: ToolChain(D, Triple, Args) {
assert(Triple.isArch32Bit() != Triple.isArch64Bit());
+
+ getProgramPaths().push_back(getDriver().getInstalledDir());
+
getFilePaths().push_back(
getDriver().SysRoot + "/lib" + (Triple.isArch32Bit() ? "32" : "64"));
}