main: drop the dependency on llvm-ar

The ar file format is pretty simple and can be implemented by using a Go
library. Use that instead of calling out to llvm-ar.

There are a few limitations to the used package, but that doesn't seem
to matter for our use case (linking compiler-rt for use with ld.lld):

  * no index is created
  * long filenames are truncated
  * no support for archives bigger than 4GB
This commit is contained in:
Ayke van Laethem
2019-04-07 15:40:03 +02:00
committed by Ron Evans
parent 078dd9ff52
commit 315cd4059f
5 changed files with 51 additions and 10 deletions
-1
View File
@@ -4,7 +4,6 @@ package main
// commands used by the compilation process might have different file names on Linux than those used on macOS.
var commands = map[string]string{
"ar": "llvm-ar-8",
"clang": "clang-8",
"ld.lld": "ld.lld-8",
"wasm-ld": "wasm-ld-8",