
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
10 строки
247 Б
Go
10 строки
247 Б
Go
// +build darwin
|
|
|
|
package main
|
|
|
|
// commands used by the compilation process might have different file names on macOS than those used on Linux.
|
|
var commands = map[string]string{
|
|
"clang": "clang-8",
|
|
"ld.lld": "ld.lld",
|
|
"wasm-ld": "wasm-ld",
|
|
}
|