all: update to LLVM 14

Switch over to LLVM 14 for static builds. Keep using LLVM 13 for regular
builds for now.

This uses a branch of the upstream Espressif branch to fix an issue,
see: https://github.com/espressif/llvm-project/pull/59
This commit is contained in:
Ayke van Laethem
2022-02-05 14:27:50 +01:00
committed by Ron Evans
parent cad6a57077
commit 6b31ee1e93
43 changed files with 101 additions and 70 deletions
+6 -1
View File
@@ -6,6 +6,7 @@ import (
"github.com/tinygo-org/tinygo/compileopts"
"github.com/tinygo-org/tinygo/goenv"
"tinygo.org/x/go-llvm"
)
// Create a job that builds a Darwin libSystem.dylib stub library. This library
@@ -38,8 +39,12 @@ func makeDarwinLibSystemJob(config *compileopts.Config, tmpdir string) *compileJ
// Link object file to dynamic library.
platformVersion := strings.TrimPrefix(strings.Split(config.Triple(), "-")[2], "macosx")
flavor := "darwin"
if strings.Split(llvm.Version, ".")[0] < "13" {
flavor = "darwinnew" // needed on LLVM 12 and below
}
flags = []string{
"-flavor", "darwinnew",
"-flavor", flavor,
"-demangle",
"-dynamic",
"-dylib",