Skip to content

Commit 6f4d40e

Browse files
committed
Move -bulk-memory flags from wasm-ld flags to a function attributes.
1 parent d757a4d commit 6f4d40e

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed
+3-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
target datalayout = "e-m:e-p:32:32-p10:8:8-p20:8:8-i64:64-n32:64-S128"
22
target triple = "wasm32-unknown-unknown"
33

4-
define void @memcpy() {
4+
define void @memcpy() #0 {
55
ret void
66
}
7+
8+
attributes #0 = { "target-features"="-bulk-memory" }

lld/test/wasm/lto/libcall-archive.ll

+4-2
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,22 @@
22
; RUN: llvm-as -o %t.o %s
33
; RUN: llvm-as -o %t2.o %S/Inputs/libcall-archive.ll
44
; RUN: llvm-ar rcs %t.a %t2.o
5-
; RUN: wasm-ld -mllvm -mattr=-bulk-memory -o %t %t.o %t.a
5+
; RUN: wasm-ld -o %t %t.o %t.a
66
; RUN: obj2yaml %t | FileCheck %s
77

88
target datalayout = "e-m:e-p:32:32-p10:8:8-p20:8:8-i64:64-n32:64-S128"
99
target triple = "wasm32-unknown-unknown"
1010

11-
define void @_start(ptr %a, ptr %b) {
11+
define void @_start(ptr %a, ptr %b) #0 {
1212
entry:
1313
call void @llvm.memcpy.p0.p0.i64(ptr %a, ptr %b, i64 1024, i1 false)
1414
ret void
1515
}
1616

1717
declare void @llvm.memcpy.p0.p0.i64(ptr nocapture, ptr nocapture, i64, i1)
1818

19+
attributes #0 = { "target-features"="-bulk-memory" }
20+
1921
; CHECK: - Type: CUSTOM
2022
; CHECK-NEXT: Name: name
2123
; CHECK-NEXT: FunctionNames:

0 commit comments

Comments
 (0)