mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-20 20:39:06 +00:00
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:
committed by
Ron Evans
parent
cad6a57077
commit
6b31ee1e93
@@ -277,8 +277,12 @@ func defaultTarget(goos, goarch, triple string) (*TargetSpec, error) {
|
||||
spec.Libc = "darwin-libSystem"
|
||||
arch := strings.Split(triple, "-")[0]
|
||||
platformVersion := strings.TrimPrefix(strings.Split(triple, "-")[2], "macosx")
|
||||
flavor := "darwin"
|
||||
if strings.Split(llvm.Version, ".")[0] < "13" {
|
||||
flavor = "darwinnew" // needed on LLVM 12 and below
|
||||
}
|
||||
spec.LDFlags = append(spec.LDFlags,
|
||||
"-flavor", "darwinnew",
|
||||
"-flavor", flavor,
|
||||
"-dead_strip",
|
||||
"-arch", arch,
|
||||
"-platform_version", "macos", platformVersion, platformVersion,
|
||||
|
||||
Reference in New Issue
Block a user