aboutsummaryrefslogtreecommitdiffhomepage
path: root/builder/musl.go
diff options
context:
space:
mode:
authorAyke van Laethem <[email protected]>2023-09-18 17:54:29 +0200
committerAyke <[email protected]>2023-10-01 18:32:15 +0200
commit1da1abe3147796aa56a5486ed6f07afdd88d8234 (patch)
tree256e56c96855bb27e67834a9586bac510ccff910 /builder/musl.go
parentc9721197d5adb70a5086ecd320a1e3745bcaacc7 (diff)
downloadtinygo-1da1abe3147796aa56a5486ed6f07afdd88d8234.tar.gz
tinygo-1da1abe3147796aa56a5486ed6f07afdd88d8234.zip
all: remove LLVM 14 support
This is a big change: apart from removing LLVM 14 it also removes typed pointer support (which was only fully supported in LLVM up to version 14). This removes about 200 lines of code, but more importantly removes a ton of special cases for LLVM 14.
Diffstat (limited to 'builder/musl.go')
-rw-r--r--builder/musl.go8
1 files changed, 1 insertions, 7 deletions
diff --git a/builder/musl.go b/builder/musl.go
index a65a920b7..6ae1fda06 100644
--- a/builder/musl.go
+++ b/builder/musl.go
@@ -6,12 +6,10 @@ import (
"os"
"path/filepath"
"regexp"
- "strconv"
"strings"
"github.com/tinygo-org/tinygo/compileopts"
"github.com/tinygo-org/tinygo/goenv"
- "tinygo.org/x/go-llvm"
)
var Musl = Library{
@@ -93,6 +91,7 @@ var Musl = Library{
"-Wno-string-plus-int",
"-Wno-ignored-pragmas",
"-Wno-tautological-constant-out-of-range-compare",
+ "-Wno-deprecated-non-prototype",
"-Qunused-arguments",
// Select include dirs. Don't include standard library includes
// (that would introduce host dependencies and other complications),
@@ -106,11 +105,6 @@ var Musl = Library{
"-I" + muslDir + "/include",
"-fno-stack-protector",
}
- llvmMajor, _ := strconv.Atoi(strings.SplitN(llvm.Version, ".", 2)[0])
- if llvmMajor >= 15 {
- // This flag was added in Clang 15. It is not present in LLVM 14.
- cflags = append(cflags, "-Wno-deprecated-non-prototype")
- }
return cflags
},
sourceDir: func() string { return filepath.Join(goenv.Get("TINYGOROOT"), "lib/musl/src") },