[PATCH] D56553: [WebAssembly] Change the default lib path for wasm32 to be lib32

Dan Gohman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 10 10:10:14 PST 2019


sunfish created this revision.
sunfish added reviewers: sbc100, aheejin, dschuff.
Herald added subscribers: llvm-commits, jgravelle-google.

This changes the default lib path from plain "lib" to "lib32", and anticipates a future "lib64". While not every architecture uses this naming scheme, "lib32"/"lib64" is consistent with the naming of "wasm32"/"wasm64".


Repository:
  rL LLVM

https://reviews.llvm.org/D56553

Files:
  lib/Driver/ToolChains/WebAssembly.cpp


Index: lib/Driver/ToolChains/WebAssembly.cpp
===================================================================
--- lib/Driver/ToolChains/WebAssembly.cpp
+++ lib/Driver/ToolChains/WebAssembly.cpp
@@ -75,7 +75,11 @@
 
   getProgramPaths().push_back(getDriver().getInstalledDir());
 
-  getFilePaths().push_back(getDriver().SysRoot + "/lib");
+  if (Triple.isArch32Bit()) {
+    getFilePaths().push_back(getDriver().SysRoot + "/lib32");
+  } else {
+    getFilePaths().push_back(getDriver().SysRoot + "/lib64");
+  }
 }
 
 bool WebAssembly::IsMathErrnoDefault() const { return false; }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D56553.181080.patch
Type: text/x-patch
Size: 585 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190110/e0012444/attachment.bin>


More information about the llvm-commits mailing list