Skip to content

Commit ac627c6

Browse files
committed
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: espressif/llvm-project#59
1 parent cad6a57 commit ac627c6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+95
-64
lines changed

.circleci/config.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@ commands:
2222
steps:
2323
- restore_cache:
2424
keys:
25-
- llvm-source-13-v3
25+
- llvm-source-14-v1
2626
- run:
2727
name: "Fetch LLVM source"
2828
command: make llvm-source
2929
- save_cache:
30-
key: llvm-source-13-v3
30+
key: llvm-source-14-v1
3131
paths:
3232
- llvm-project/clang/lib/Headers
3333
- llvm-project/clang/include

.github/workflows/build-macos.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
uses: actions/cache@v2
3636
id: cache-llvm-source
3737
with:
38-
key: llvm-source-13-macos-v2
38+
key: llvm-source-14-macos-v1
3939
path: |
4040
llvm-project/clang/lib/Headers
4141
llvm-project/clang/include
@@ -49,7 +49,7 @@ jobs:
4949
uses: actions/cache@v2
5050
id: cache-llvm-build
5151
with:
52-
key: llvm-build-13-macos-v3
52+
key: llvm-build-14-macos-v1
5353
path: llvm-build
5454
- name: Build LLVM
5555
if: steps.cache-llvm-build.outputs.cache-hit != 'true'

.github/workflows/linux.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
uses: actions/cache@v2
3939
id: cache-llvm-source
4040
with:
41-
key: llvm-source-13-linux-v2
41+
key: llvm-source-14-linux-v1
4242
path: |
4343
llvm-project/clang/lib/Headers
4444
llvm-project/clang/include
@@ -52,7 +52,7 @@ jobs:
5252
uses: actions/cache@v2
5353
id: cache-llvm-build
5454
with:
55-
key: llvm-build-13-linux-v2
55+
key: llvm-build-14-linux-v1
5656
path: llvm-build
5757
- name: Build LLVM
5858
if: steps.cache-llvm-build.outputs.cache-hit != 'true'
@@ -180,7 +180,7 @@ jobs:
180180
uses: actions/cache@v2
181181
id: cache-llvm-source
182182
with:
183-
key: llvm-source-13-linux-asserts-v2
183+
key: llvm-source-14-linux-asserts-v1
184184
path: |
185185
llvm-project/clang/lib/Headers
186186
llvm-project/clang/include
@@ -194,7 +194,7 @@ jobs:
194194
uses: actions/cache@v2
195195
id: cache-llvm-build
196196
with:
197-
key: llvm-build-13-linux-asserts-v2
197+
key: llvm-build-14-linux-asserts-v1
198198
path: llvm-build
199199
- name: Build LLVM
200200
if: steps.cache-llvm-build.outputs.cache-hit != 'true'

.github/workflows/windows.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
uses: actions/cache@v2
3636
id: cache-llvm-source
3737
with:
38-
key: llvm-source-13-windows-v2
38+
key: llvm-source-14-windows-v1
3939
path: |
4040
llvm-project/clang/lib/Headers
4141
llvm-project/clang/include
@@ -49,7 +49,7 @@ jobs:
4949
uses: actions/cache@v2
5050
id: cache-llvm-build
5151
with:
52-
key: llvm-build-13-windows-v2
52+
key: llvm-build-14-windows-v1
5353
path: llvm-build
5454
- name: Build LLVM
5555
if: steps.cache-llvm-build.outputs.cache-hit != 'true'

Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ LLD_SRC ?= $(LLVM_PROJECTDIR)/lld
1010

1111
# Try to autodetect LLVM build tools.
1212
# Versions are listed here in descending priority order.
13-
LLVM_VERSIONS = 13 12 11
13+
LLVM_VERSIONS = 14 13 12 11
1414
errifempty = $(if $(1),$(1),$(error $(2)))
1515
detect = $(shell which $(call errifempty,$(firstword $(foreach p,$(2),$(shell command -v $(p) 2> /dev/null && echo $(p)))),failed to locate $(1) at any of: $(2)))
1616
toolSearchPathsVersion = $(1)-$(2)
@@ -91,11 +91,11 @@ CLANG_LIB_NAMES = clangAnalysis clangAST clangASTMatchers clangBasic clangCodeGe
9191
CLANG_LIBS = $(START_GROUP) $(addprefix -l,$(CLANG_LIB_NAMES)) $(END_GROUP) -lstdc++
9292

9393
# Libraries that should be linked in for the statically linked LLD.
94-
LLD_LIB_NAMES = lldCOFF lldCommon lldCore lldDriver lldELF lldMachO2 lldMinGW lldReaderWriter lldWasm lldYAML
94+
LLD_LIB_NAMES = lldCOFF lldCommon lldELF lldMachO lldMinGW lldWasm
9595
LLD_LIBS = $(START_GROUP) $(addprefix -l,$(LLD_LIB_NAMES)) $(END_GROUP)
9696

9797
# Other libraries that are needed to link TinyGo.
98-
EXTRA_LIB_NAMES = LLVMInterpreter
98+
EXTRA_LIB_NAMES = LLVMInterpreter LLVMMCA LLVMX86TargetMCA
9999

100100
# All libraries to be built and linked with the tinygo binary (lib/lib*.a).
101101
LIB_NAMES = clang $(CLANG_LIB_NAMES) $(LLD_LIB_NAMES) $(EXTRA_LIB_NAMES)
@@ -175,7 +175,7 @@ gen-device-rp: build/gen-device-svd
175175

176176
# Get LLVM sources.
177177
$(LLVM_PROJECTDIR)/llvm:
178-
git clone -b xtensa_release_13.0.0 --depth=1 https://github.com/tinygo-org/llvm-project $(LLVM_PROJECTDIR)
178+
git clone -b xtensa_release_14.0.0-patched --depth=1 https://github.com/tinygo-org/llvm-project $(LLVM_PROJECTDIR)
179179
llvm-source: $(LLVM_PROJECTDIR)/llvm
180180

181181
# Configure LLVM.

builder/cc1as.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
#include "llvm/MC/MCStreamer.h"
3939
#include "llvm/MC/MCSubtargetInfo.h"
4040
#include "llvm/MC/MCTargetOptions.h"
41+
#include "llvm/MC/TargetRegistry.h"
4142
#include "llvm/Option/Arg.h"
4243
#include "llvm/Option/ArgList.h"
4344
#include "llvm/Option/OptTable.h"
@@ -51,7 +52,6 @@
5152
#include "llvm/Support/Process.h"
5253
#include "llvm/Support/Signals.h"
5354
#include "llvm/Support/SourceMgr.h"
54-
#include "llvm/Support/TargetRegistry.h"
5555
#include "llvm/Support/TargetSelect.h"
5656
#include "llvm/Support/Timer.h"
5757
#include "llvm/Support/raw_ostream.h"
@@ -120,7 +120,6 @@ bool AssemblerInvocation::CreateFromArgs(AssemblerInvocation &Opts,
120120
llvm::StringSwitch<llvm::DebugCompressionType>(A->getValue())
121121
.Case("none", llvm::DebugCompressionType::None)
122122
.Case("zlib", llvm::DebugCompressionType::Z)
123-
.Case("zlib-gnu", llvm::DebugCompressionType::GNU)
124123
.Default(llvm::DebugCompressionType::None);
125124
}
126125

@@ -382,7 +381,7 @@ static bool ExecuteAssemblerImpl(AssemblerInvocation &Opts,
382381
T, Ctx, std::move(MAB), std::move(OW), std::move(CE), *STI,
383382
Opts.RelaxAll, Opts.IncrementalLinkerCompatible,
384383
/*DWARFMustBeAtTheEnd*/ true));
385-
Str.get()->InitSections(Opts.NoExecStack);
384+
Str.get()->initSections(Opts.NoExecStack, *STI);
386385
}
387386

388387
// When -fembed-bitcode is passed to clang_as, a 1-byte marker
@@ -442,7 +441,7 @@ bool ExecuteAssembler(AssemblerInvocation &Opts,
442441
return Failed;
443442
}
444443

445-
static void LLVMErrorHandler(void *UserData, const std::string &Message,
444+
static void LLVMErrorHandler(void *UserData, const char *Message,
446445
bool GenCrashDiag) {
447446
DiagnosticsEngine &Diags = *static_cast<DiagnosticsEngine*>(UserData);
448447

builder/darwin-libsystem.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import (
66

77
"github.com/tinygo-org/tinygo/compileopts"
88
"github.com/tinygo-org/tinygo/goenv"
9+
"tinygo.org/x/go-llvm"
910
)
1011

1112
// 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
3839

3940
// Link object file to dynamic library.
4041
platformVersion := strings.TrimPrefix(strings.Split(config.Triple(), "-")[2], "macosx")
42+
flavor := "darwin"
43+
if strings.Split(llvm.Version, ".")[0] < "13" {
44+
flavor = "darwinnew" // needed on LLVM 12 and below
45+
}
4146
flags = []string{
42-
"-flavor", "darwinnew",
47+
"-flavor", flavor,
4348
"-demangle",
4449
"-dynamic",
4550
"-dylib",

builder/lld.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,22 @@ extern "C" {
88

99
bool tinygo_link_elf(int argc, char **argv) {
1010
std::vector<const char*> args(argv, argv + argc);
11-
return lld::elf::link(args, false, llvm::outs(), llvm::errs());
11+
return lld::elf::link(args, llvm::outs(), llvm::errs(), false, false);
1212
}
1313

1414
bool tinygo_link_macho(int argc, char **argv) {
1515
std::vector<const char*> args(argv, argv + argc);
16-
return lld::macho::link(args, false, llvm::outs(), llvm::errs());
16+
return lld::macho::link(args, llvm::outs(), llvm::errs(), false, false);
1717
}
1818

1919
bool tinygo_link_mingw(int argc, char **argv) {
2020
std::vector<const char*> args(argv, argv + argc);
21-
return lld::mingw::link(args, false, llvm::outs(), llvm::errs());
21+
return lld::mingw::link(args, llvm::outs(), llvm::errs(), false, false);
2222
}
2323

2424
bool tinygo_link_wasm(int argc, char **argv) {
2525
std::vector<const char*> args(argv, argv + argc);
26-
return lld::wasm::link(args, false, llvm::outs(), llvm::errs());
26+
return lld::wasm::link(args, llvm::outs(), llvm::errs(), false, false);
2727
}
2828

2929
} // external "C"

builder/tools-builtin.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ func RunTool(tool string, args ...string) error {
5454
ok = C.tinygo_clang_driver(C.int(len(args)), (**C.char)(buf))
5555
case "ld.lld":
5656
switch linker {
57-
case "darwinnew":
57+
case "darwin", "darwinnew": // darwinnew is only needed for LLVM 12 and below
5858
ok = C.tinygo_link_macho(C.int(len(args)), (**C.char)(buf))
5959
case "elf":
6060
ok = C.tinygo_link_elf(C.int(len(args)), (**C.char)(buf))

cgo/libclang_config_llvm13.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
//go:build !byollvm && !llvm11 && !llvm12
2-
// +build !byollvm,!llvm11,!llvm12
1+
//go:build !byollvm && !llvm11 && !llvm12 && !llvm14
2+
// +build !byollvm,!llvm11,!llvm12,!llvm14
33

44
package cgo
55

cgo/libclang_config_llvm14.go

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
//go:build !byollvm && llvm14
2+
// +build !byollvm,llvm14
3+
4+
package cgo
5+
6+
/*
7+
#cgo linux CFLAGS: -I/usr/lib/llvm-14/include
8+
#cgo darwin amd64 CFLAGS: -I/usr/local/opt/llvm@14/include
9+
#cgo darwin arm64 CFLAGS: -I/opt/homebrew/opt/llvm@14/include
10+
#cgo freebsd CFLAGS: -I/usr/local/llvm14/include
11+
#cgo linux LDFLAGS: -L/usr/lib/llvm-14/lib -lclang
12+
#cgo darwin amd64 LDFLAGS: -L/usr/local/opt/llvm@14/lib -lclang -lffi
13+
#cgo darwin arm64 LDFLAGS: -L/opt/homebrew/opt/llvm@14/lib -lclang -lffi
14+
#cgo freebsd LDFLAGS: -L/usr/local/llvm14/lib -lclang
15+
*/
16+
import "C"

compileopts/target.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,8 +277,12 @@ func defaultTarget(goos, goarch, triple string) (*TargetSpec, error) {
277277
spec.Libc = "darwin-libSystem"
278278
arch := strings.Split(triple, "-")[0]
279279
platformVersion := strings.TrimPrefix(strings.Split(triple, "-")[2], "macosx")
280+
flavor := "darwin"
281+
if strings.Split(llvm.Version, ".")[0] < "13" {
282+
flavor = "darwinnew" // needed on LLVM 12 and below
283+
}
280284
spec.LDFlags = append(spec.LDFlags,
281-
"-flavor", "darwinnew",
285+
"-flavor", flavor,
282286
"-dead_strip",
283287
"-arch", arch,
284288
"-platform_version", "macos", platformVersion, platformVersion,

compiler/compiler.go

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -957,10 +957,10 @@ func (b *builder) createFunction() {
957957
} else {
958958
fieldOffsets := b.expandFormalParamOffsets(llvmType)
959959
for i, field := range fields {
960-
expr := b.dibuilder.CreateExpression([]int64{
961-
0x1000, // DW_OP_LLVM_fragment
962-
int64(fieldOffsets[i]) * 8, // offset in bits
963-
int64(b.targetData.TypeAllocSize(field.Type())) * 8, // size in bits
960+
expr := b.dibuilder.CreateExpression([]uint64{
961+
0x1000, // DW_OP_LLVM_fragment
962+
fieldOffsets[i] * 8, // offset in bits
963+
b.targetData.TypeAllocSize(field.Type()) * 8, // size in bits
964964
})
965965
b.dibuilder.InsertValueAtEnd(field, dbgParam, expr, loc, entryBlock)
966966
}
@@ -1469,6 +1469,14 @@ func (b *builder) createFunctionCall(instr *ssa.CallCommon) (llvm.Value, error)
14691469
case *ssa.Function:
14701470
// Regular function call. No context is necessary.
14711471
context = llvm.Undef(b.i8ptrType)
1472+
if info.variadic && len(fn.Params) == 0 {
1473+
// This matches Clang, see: https://godbolt.org/z/Gqv49xKMq
1474+
// Eventually we might be able to eliminate this special case
1475+
// entirely. For details, see:
1476+
// https://discourse.llvm.org/t/rfc-enabling-wstrict-prototypes-by-default-in-c/60521
1477+
fnType := llvm.FunctionType(callee.Type().ElementType().ReturnType(), nil, false)
1478+
callee = llvm.ConstBitCast(callee, llvm.PointerType(fnType, b.funcPtrAddrSpace))
1479+
}
14721480
case *ssa.MakeClosure:
14731481
// A call on a func value, but the callee is trivial to find. For
14741482
// example: immediately applied functions.

compiler/compiler_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,9 +226,9 @@ func filterIrrelevantIRLines(lines []string) []string {
226226
// Right now test outputs are for LLVM 12 and higher.
227227
continue
228228
}
229-
if llvmVersion < 13 && strings.HasPrefix(line, "target datalayout = ") {
229+
if llvmVersion < 14 && strings.HasPrefix(line, "target datalayout = ") {
230230
// The datalayout string may vary betewen LLVM versions.
231-
// Right now test outputs are for LLVM 13 and higher.
231+
// Right now test outputs are for LLVM 14 and higher.
232232
continue
233233
}
234234
out = append(out, line)

compiler/testdata/basic.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
; ModuleID = 'basic.go'
22
source_filename = "basic.go"
3-
target datalayout = "e-m:e-p:32:32-i64:64-n32:64-S128-ni:1:10:20"
3+
target datalayout = "e-m:e-p:32:32-p10:8:8-p20:8:8-i64:64-n32:64-S128-ni:1:10:20"
44
target triple = "wasm32-unknown-wasi"
55

66
%main.kv = type { float }

compiler/testdata/channel.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
; ModuleID = 'channel.go'
22
source_filename = "channel.go"
3-
target datalayout = "e-m:e-p:32:32-i64:64-n32:64-S128-ni:1:10:20"
3+
target datalayout = "e-m:e-p:32:32-p10:8:8-p20:8:8-i64:64-n32:64-S128-ni:1:10:20"
44
target triple = "wasm32-unknown-wasi"
55

66
%runtime.channel = type { i32, i32, i8, %runtime.channelBlockedList*, i32, i32, i32, i8* }

compiler/testdata/float.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
; ModuleID = 'float.go'
22
source_filename = "float.go"
3-
target datalayout = "e-m:e-p:32:32-i64:64-n32:64-S128-ni:1:10:20"
3+
target datalayout = "e-m:e-p:32:32-p10:8:8-p20:8:8-i64:64-n32:64-S128-ni:1:10:20"
44
target triple = "wasm32-unknown-wasi"
55

66
declare noalias nonnull i8* @runtime.alloc(i32, i8*, i8*)

compiler/testdata/func.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
; ModuleID = 'func.go'
22
source_filename = "func.go"
3-
target datalayout = "e-m:e-p:32:32-i64:64-n32:64-S128-ni:1:10:20"
3+
target datalayout = "e-m:e-p:32:32-p10:8:8-p20:8:8-i64:64-n32:64-S128-ni:1:10:20"
44
target triple = "wasm32-unknown-wasi"
55

66
declare noalias nonnull i8* @runtime.alloc(i32, i8*, i8*)

compiler/testdata/gc.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
; ModuleID = 'gc.go'
22
source_filename = "gc.go"
3-
target datalayout = "e-m:e-p:32:32-i64:64-n32:64-S128-ni:1:10:20"
3+
target datalayout = "e-m:e-p:32:32-p10:8:8-p20:8:8-i64:64-n32:64-S128-ni:1:10:20"
44
target triple = "wasm32-unknown-wasi"
55

66
%runtime.typecodeID = type { %runtime.typecodeID*, i32, %runtime.interfaceMethodInfo*, %runtime.typecodeID*, i32 }

compiler/testdata/go1.17.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
; ModuleID = 'go1.17.go'
22
source_filename = "go1.17.go"
3-
target datalayout = "e-m:e-p:32:32-i64:64-n32:64-S128-ni:1:10:20"
3+
target datalayout = "e-m:e-p:32:32-p10:8:8-p20:8:8-i64:64-n32:64-S128-ni:1:10:20"
44
target triple = "wasm32-unknown-wasi"
55

66
declare noalias nonnull i8* @runtime.alloc(i32, i8*, i8*)

compiler/testdata/goroutine-wasm-asyncify.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
; ModuleID = 'goroutine.go'
22
source_filename = "goroutine.go"
3-
target datalayout = "e-m:e-p:32:32-i64:64-n32:64-S128-ni:1:10:20"
3+
target datalayout = "e-m:e-p:32:32-p10:8:8-p20:8:8-i64:64-n32:64-S128-ni:1:10:20"
44
target triple = "wasm32-unknown-wasi"
55

66
%runtime.channel = type { i32, i32, i8, %runtime.channelBlockedList*, i32, i32, i32, i8* }

compiler/testdata/interface.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
; ModuleID = 'interface.go'
22
source_filename = "interface.go"
3-
target datalayout = "e-m:e-p:32:32-i64:64-n32:64-S128-ni:1:10:20"
3+
target datalayout = "e-m:e-p:32:32-p10:8:8-p20:8:8-i64:64-n32:64-S128-ni:1:10:20"
44
target triple = "wasm32-unknown-wasi"
55

66
%runtime.typecodeID = type { %runtime.typecodeID*, i32, %runtime.interfaceMethodInfo*, %runtime.typecodeID*, i32 }

compiler/testdata/intrinsics-wasm.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
; ModuleID = 'intrinsics.go'
22
source_filename = "intrinsics.go"
3-
target datalayout = "e-m:e-p:32:32-i64:64-n32:64-S128-ni:1:10:20"
3+
target datalayout = "e-m:e-p:32:32-p10:8:8-p20:8:8-i64:64-n32:64-S128-ni:1:10:20"
44
target triple = "wasm32-unknown-wasi"
55

66
declare noalias nonnull i8* @runtime.alloc(i32, i8*, i8*)

compiler/testdata/pointer.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
; ModuleID = 'pointer.go'
22
source_filename = "pointer.go"
3-
target datalayout = "e-m:e-p:32:32-i64:64-n32:64-S128-ni:1:10:20"
3+
target datalayout = "e-m:e-p:32:32-p10:8:8-p20:8:8-i64:64-n32:64-S128-ni:1:10:20"
44
target triple = "wasm32-unknown-wasi"
55

66
declare noalias nonnull i8* @runtime.alloc(i32, i8*, i8*)

compiler/testdata/pragma.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
; ModuleID = 'pragma.go'
22
source_filename = "pragma.go"
3-
target datalayout = "e-m:e-p:32:32-i64:64-n32:64-S128-ni:1:10:20"
3+
target datalayout = "e-m:e-p:32:32-p10:8:8-p20:8:8-i64:64-n32:64-S128-ni:1:10:20"
44
target triple = "wasm32-unknown-wasi"
55

66
@extern_global = external global [0 x i8], align 1

compiler/testdata/slice.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
; ModuleID = 'slice.go'
22
source_filename = "slice.go"
3-
target datalayout = "e-m:e-p:32:32-i64:64-n32:64-S128-ni:1:10:20"
3+
target datalayout = "e-m:e-p:32:32-p10:8:8-p20:8:8-i64:64-n32:64-S128-ni:1:10:20"
44
target triple = "wasm32-unknown-wasi"
55

66
declare noalias nonnull i8* @runtime.alloc(i32, i8*, i8*)

0 commit comments

Comments
 (0)