gollvm: add /usr/{lib,lib32} to toolchain paths for arch linux
this uses Distro to make adding /usr/ path only happen if build system is running Arch Linux
Change-Id: I0b91b717a42ed643ad049ea206fa4a9f3c66df9a
Reviewed-on: https://go-review.googlesource.com/c/gollvm/+/399876
Reviewed-by: Than McIntosh <thanm@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
diff --git a/driver/LinuxToolChain.cpp b/driver/LinuxToolChain.cpp
index 22a6120..73037f1 100644
--- a/driver/LinuxToolChain.cpp
+++ b/driver/LinuxToolChain.cpp
@@ -73,6 +73,8 @@
"/../" + ftrip).str());
addIfPathExists(fpaths, llvm::Twine(osLibDir).str());
addIfPathExists(fpaths, llvm::Twine(osLibDir + "/" + ftrip).str());
+ if (this->distro_ == distro::DistroArchLinux)
+ addIfPathExists(fpaths, llvm::Twine("/usr/" + osLibDir).str());
// Include program and file paths in verbose output.
if (driver.args().hasArg(gollvm::options::OPT_v)) {