Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
126 commits
Select commit Hold shift + click to select a range
48a90dd
Initial work
TartanLlama Jan 5, 2026
540d785
Get wasip3 into working state
TartanLlama Jan 9, 2026
8f222c9
Don't disable threads on WASIP3 if no atomics, and don't set the TLS …
TartanLlama Feb 17, 2026
e9775de
Merge branch 'main' into sy/wasip3
TartanLlama Feb 17, 2026
6d2b464
Factor out WASIP3 into options and features
TartanLlama Feb 17, 2026
0bf29ae
Merge branch 'sy/wasip3' of github.com:TartanLlama/llvm-project into …
TartanLlama Feb 17, 2026
4a18333
Tighten up features
TartanLlama Feb 17, 2026
927daeb
Make feature detection work properly
TartanLlama Feb 17, 2026
e632709
Fix TLS relocations for non WASIP3
TartanLlama Feb 17, 2026
f44bf29
Add stack pointer ABI test
TartanLlama Feb 17, 2026
18a1ee3
Add tests for component model threading feature
TartanLlama Feb 17, 2026
8980e38
Add wasm-features test
TartanLlama Feb 17, 2026
08a3a16
wasm-toolchain tests
TartanLlama Feb 17, 2026
9092b93
Formatting
TartanLlama Feb 17, 2026
81ffb2b
Formatting
TartanLlama Feb 17, 2026
a9e7310
Revert arch change
TartanLlama Feb 17, 2026
c369bb2
Formatting
TartanLlama Feb 17, 2026
d368838
Revert formatting change
TartanLlama Feb 17, 2026
61f03e5
Revert formatting change
TartanLlama Feb 17, 2026
c9665c1
Revert formatting changes
TartanLlama Feb 17, 2026
07e122d
Revert formatting changes
TartanLlama Feb 17, 2026
651c362
Revert formatting changes
TartanLlama Feb 17, 2026
0175bd5
Revert formatting changes
TartanLlama Feb 17, 2026
9a93078
Revert formatting changes
TartanLlama Feb 17, 2026
85fab66
Revert formatting changes
TartanLlama Feb 17, 2026
e577185
Revert formatting changes
TartanLlama Feb 17, 2026
446d56d
Revert formatting changes
TartanLlama Feb 17, 2026
3f10fe8
Remove linker flag
TartanLlama Feb 18, 2026
dbae3ef
Determine thread context ABI automatically
TartanLlama Feb 18, 2026
e0dcb2a
Merge branch 'main' into sy/wasip3
TartanLlama Feb 18, 2026
e8babc7
Fix comment
TartanLlama Feb 18, 2026
822ea98
Test updates
TartanLlama Feb 18, 2026
cb2fb8d
TLS fixes
TartanLlama Feb 18, 2026
6cf7c2a
TLS test
TartanLlama Feb 18, 2026
fa7eea8
Continue rather than break when determiting thread context ABI
TartanLlama Feb 18, 2026
cc1ea2f
Only consider the current object file's symbols for determining threa…
TartanLlama Feb 18, 2026
b9039eb
Typo
TartanLlama Feb 18, 2026
1b490cd
Formatting
TartanLlama Feb 18, 2026
b55ae63
TLS fixes
TartanLlama Feb 18, 2026
a1c563b
Tighten up Toolchain driver
TartanLlama Feb 18, 2026
69654ef
Fix clang test
TartanLlama Feb 18, 2026
b98b9ab
Add wasm-target-features test for preprocessor defines
TartanLlama Feb 18, 2026
7121ea5
Remove debug code
TartanLlama Feb 18, 2026
70b3b93
Complete asm printing/parsing changes
TartanLlama Feb 18, 2026
43f756f
Clean up target feature decision
TartanLlama Feb 20, 2026
4ffe623
Use llvm::Triple::WASIp3 rather than a string
TartanLlama Feb 20, 2026
36c39bf
More driver tests
TartanLlama Feb 20, 2026
d953510
Fix tests
TartanLlama Feb 20, 2026
0656bbf
Strip thread locals if no bulk memory
TartanLlama Feb 20, 2026
c5190ff
Thread pointer test
TartanLlama Feb 20, 2026
6e0c9c0
TLS local exec test
TartanLlama Feb 20, 2026
3386a11
Add stack abi test
TartanLlama Feb 20, 2026
5775592
Shared memory fixes
TartanLlama Feb 20, 2026
4d7a81e
Enable component model context in WASIP3 in LLVM
TartanLlama Feb 20, 2026
1001e65
Merge branch 'main' into sy/wasip3
TartanLlama Feb 20, 2026
7a44741
Tighten up linker changes
TartanLlama Feb 20, 2026
4c62c81
Fix LLVM tests
TartanLlama Feb 20, 2026
5bebe2a
Merge branch 'main' into sy/wasip3
TartanLlama Feb 20, 2026
e9fa9fc
Remove unused code
TartanLlama Feb 23, 2026
10ed134
Change asserts for symbol creation
TartanLlama Feb 23, 2026
2ee9845
Fix frame debug info
TartanLlama Feb 23, 2026
c6ddead
Merge branch 'main' into sy/wasip3
TartanLlama Feb 23, 2026
2bae426
Merge branch 'sy/wasip3' of github.com:TartanLlama/llvm-project into …
TartanLlama Feb 23, 2026
557bfac
Tighten up linker changes
TartanLlama Feb 23, 2026
61c25c8
Typo
TartanLlama Feb 23, 2026
0fe07f0
Improve TLS test
TartanLlama Feb 23, 2026
7a58fce
Fix TLS in shared objects
TartanLlama Feb 23, 2026
8047c76
Update comment
TartanLlama Feb 23, 2026
24cb457
Remove symbol file changes for now
TartanLlama Feb 23, 2026
ff172dc
Merge branch 'main' into sy/wasip3
TartanLlama Mar 3, 2026
d11664a
Clang format
TartanLlama Mar 3, 2026
f04b74a
Format
TartanLlama Mar 3, 2026
6bdff2c
Fix tests
TartanLlama Mar 3, 2026
a637ae1
fmt
TartanLlama Mar 3, 2026
0bf18a6
Add chain to TLS base
TartanLlama Mar 3, 2026
6c9c276
fmt
TartanLlama Mar 3, 2026
f019ea9
Change chain impl
TartanLlama Mar 3, 2026
de9424c
Correct chain
TartanLlama Mar 3, 2026
5954755
fmt
TartanLlama Mar 3, 2026
1f9e903
Simplify getTLSBase
TartanLlama Mar 3, 2026
f61837a
fmt
TartanLlama Mar 3, 2026
bde41fc
Add missing include
TartanLlama Mar 3, 2026
daf5b03
fmt
TartanLlama Mar 4, 2026
36ea1df
Merge branch 'main' into sy/wasip3
TartanLlama Mar 4, 2026
41f8893
Revert archive-export changes
TartanLlama Mar 4, 2026
0a8c6ec
Merge branch 'main' into sy/wasip3
TartanLlama Mar 4, 2026
90c342f
Revert archive-export changes
TartanLlama Mar 4, 2026
a42942c
Merge branch 'sy/wasip3' of github.com:TartanLlama/llvm-project into …
TartanLlama Mar 4, 2026
13d3870
Revert tailcail changes
TartanLlama Mar 4, 2026
f75cb64
Revert tail call change
TartanLlama Mar 4, 2026
e1992e8
Review comments
TartanLlama Mar 4, 2026
c3d46dc
Newlines
TartanLlama Mar 5, 2026
9ecceef
Newlines
TartanLlama Mar 5, 2026
9d296ec
Remove changes from other PR
TartanLlama Mar 5, 2026
95fc53a
Comments
TartanLlama Mar 5, 2026
ae859d0
split-file
TartanLlama Mar 5, 2026
abc859d
Don't disable feature for MVP cpu
TartanLlama Mar 5, 2026
3749d9e
Don't disable feature for MVP cpu
TartanLlama Mar 5, 2026
0028170
fmt
TartanLlama Mar 5, 2026
f9f40b7
Revert test changes
TartanLlama Mar 5, 2026
c8d5420
Merge branch 'main' into sy/wasip3
TartanLlama Mar 9, 2026
9908d72
Remove merge artifact
TartanLlama Mar 9, 2026
0e1a5a9
Move writer utils
TartanLlama Mar 9, 2026
e187d8e
Revert WriterUtils changes
TartanLlama Mar 9, 2026
a2e3a85
Merge branch 'main' into sy/wasip3
TartanLlama Mar 11, 2026
b7bc6a3
Merge branch 'main' into sy/wasip3
TartanLlama Mar 16, 2026
a79dc2f
Merge branch 'main' into sy/wasip3
TartanLlama Mar 20, 2026
09f0fe3
Merge branch 'main' into sy/wasip3
TartanLlama Mar 23, 2026
1ee14c4
Abstract out context.get/set builtins
TartanLlama Mar 23, 2026
af1eb70
fmt
TartanLlama Mar 23, 2026
c661e66
fmt
TartanLlama Mar 23, 2026
e00d35f
Merge branch 'main' into sy/wasip3
TartanLlama Mar 23, 2026
742ae7c
Add comment
TartanLlama Mar 24, 2026
9b688ca
Remove option
TartanLlama Mar 24, 2026
3570777
Refactor into two config options
TartanLlama Mar 24, 2026
45ff0f0
Merge branch 'main' into sy/wasip3
TartanLlama Mar 24, 2026
e841994
Refactor
TartanLlama Apr 1, 2026
da1949c
Merge branch 'sy/wasip3' of github.com:TartanLlama/llvm-project into …
TartanLlama Apr 1, 2026
8dfc97c
Cleanup
TartanLlama Apr 1, 2026
cdca5aa
fmt
TartanLlama Apr 1, 2026
7559ec5
Flag for libcall thread context
TartanLlama Apr 1, 2026
4135d3d
Test fixes
TartanLlama Apr 1, 2026
a1cacc9
fmt
TartanLlama Apr 1, 2026
a2367c8
Merge branch 'main' into sy/wasip3
TartanLlama Apr 2, 2026
dfbfcd9
Cleanup
TartanLlama Apr 2, 2026
5c04563
newline
TartanLlama Apr 2, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions clang/include/clang/Options/Options.td
Original file line number Diff line number Diff line change
Expand Up @@ -5763,6 +5763,8 @@ def mfp16 : Flag<["-"], "mfp16">, Group<m_wasm_Features_Group>;
def mno_fp16 : Flag<["-"], "mno-fp16">, Group<m_wasm_Features_Group>;
def mgc : Flag<["-"], "mgc">, Group<m_wasm_Features_Group>;
def mno_gc : Flag<["-"], "mno-gc">, Group<m_wasm_Features_Group>;
def mlibcall_thread_context : Joined<["-"], "mlibcall-thread-context">, Group<m_wasm_Features_Group>;
def mno_libcall_thread_context : Joined<["-"], "mno-libcall-thread-context">, Group<m_wasm_Features_Group>;
def mmultimemory : Flag<["-"], "mmultimemory">, Group<m_wasm_Features_Group>;
def mno_multimemory : Flag<["-"], "mno-multimemory">, Group<m_wasm_Features_Group>;
def mmultivalue : Flag<["-"], "mmultivalue">, Group<m_wasm_Features_Group>;
Expand Down
10 changes: 10 additions & 0 deletions clang/lib/Basic/Targets/WebAssembly.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,8 @@ void WebAssemblyTargetInfo::getTargetDefines(const LangOptions &Opts,
Builder.defineMacro("__wasm_tail_call__");
if (HasWideArithmetic)
Builder.defineMacro("__wasm_wide_arithmetic__");
if (HasLibcallThreadContext)
Builder.defineMacro("__wasm_libcall_thread_context__");
// Note that not all wasm features appear here. For example,
// HasCompatctImports

Expand Down Expand Up @@ -386,6 +388,14 @@ bool WebAssemblyTargetInfo::handleTargetFeatures(
HasWideArithmetic = false;
continue;
}
if (Feature == "+libcall-thread-context") {
HasLibcallThreadContext = true;
continue;
}
if (Feature == "-libcall-thread-context") {
HasLibcallThreadContext = false;
continue;
}

Diags.Report(diag::err_opt_not_valid_with_opt)
<< Feature << "-target-feature";
Expand Down
1 change: 1 addition & 0 deletions clang/lib/Basic/Targets/WebAssembly.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ class LLVM_LIBRARY_VISIBILITY WebAssemblyTargetInfo : public TargetInfo {
bool HasExtendedConst = false;
bool HasFP16 = false;
bool HasGC = false;
bool HasLibcallThreadContext = false;
bool HasMultiMemory = false;
bool HasMultivalue = false;
bool HasMutableGlobals = false;
Expand Down
18 changes: 18 additions & 0 deletions clang/lib/Driver/ToolChains/WebAssembly.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,16 @@ static bool WantsPthread(const llvm::Triple &Triple, const ArgList &Args) {
return WantsPthread;
}

static bool WantsLibcallThreadContext(const llvm::Triple &Triple,
const ArgList &Args) {
// If the target is WASIP3, then enable the
// libcall-thread-context feature by default, unless explicitly
// disabled.
return Triple.getOS() == llvm::Triple::WASIp3 &&
Args.hasFlag(options::OPT_mlibcall_thread_context,
options::OPT_mno_libcall_thread_context, true);
}

void wasm::Linker::ConstructJob(Compilation &C, const JobAction &JA,
const InputInfo &Output,
const InputInfoList &Inputs,
Expand Down Expand Up @@ -169,6 +179,9 @@ void wasm::Linker::ConstructJob(Compilation &C, const JobAction &JA,

AddLinkerInputs(ToolChain, Inputs, Args, CmdArgs, JA);

if (WantsLibcallThreadContext(ToolChain.getTriple(), Args))
CmdArgs.push_back("--libcall-thread-context");

if (WantsPthread(ToolChain.getTriple(), Args))
CmdArgs.push_back("--shared-memory");

Expand Down Expand Up @@ -321,6 +334,11 @@ void WebAssembly::addClangTargetOptions(const ArgList &DriverArgs,
options::OPT_fno_use_init_array, true))
CC1Args.push_back("-fno-use-init-array");

if (WantsLibcallThreadContext(getTriple(), DriverArgs)) {
CC1Args.push_back("-target-feature");
CC1Args.push_back("+libcall-thread-context");
}

// '-pthread' implies atomics, bulk-memory, mutable-globals, and sign-ext
if (WantsPthread(getTriple(), DriverArgs)) {
if (DriverArgs.hasFlag(options::OPT_mno_atomics, options::OPT_matomics,
Expand Down
6 changes: 6 additions & 0 deletions clang/test/Driver/wasm-features.c
Original file line number Diff line number Diff line change
Expand Up @@ -118,3 +118,9 @@

// COMPACT-IMPORTS: "-target-feature" "+compact-imports"
// NO-COMPACT-IMPORTS: "-target-feature" "-compact-imports"

// RUN: %clang --target=wasm32-unknown-unknown -### %s -mlibcall-thread-context 2>&1 | FileCheck %s -check-prefix=LIBCALL-THREAD-CONTEXT
// RUN: %clang --target=wasm32-unknown-unknown -### %s -mno-libcall-thread-context 2>&1 | FileCheck %s -check-prefix=NO-LIBCALL-THREAD-CONTEXT

// LIBCALL-THREAD-CONTEXT: "-target-feature" "+libcall-thread-context"
// NO-LIBCALL-THREAD-CONTEXT: "-target-feature" "-libcall-thread-context"
12 changes: 12 additions & 0 deletions clang/test/Driver/wasm-toolchain.c
Original file line number Diff line number Diff line change
Expand Up @@ -303,3 +303,15 @@
// RUN: | FileCheck -check-prefix=LINK_WALI_BASIC %s
// LINK_WALI_BASIC: "-cc1" {{.*}} "-o" "[[temp:[^"]*]]"
// LINK_WALI_BASIC: wasm-ld{{.*}}" "-L/foo/lib/wasm32-linux-muslwali" "crt1.o" "[[temp]]" "-lc" "{{.*[/\\]}}libclang_rt.builtins.a" "-o" "a.out"

// `wasm32-wasip3` passes `+libcall-thread-context` by default.

// RUN: %clang -### --target=wasm32-wasip3 --sysroot=/foo %s 2>&1 \
// RUN: | FileCheck -check-prefix=LINK_WASIP3_LIBCALL_THREAD_CONTEXT %s
// LINK_WASIP3_LIBCALL_THREAD_CONTEXT: "-cc1" {{.*}} "-target-feature" "+libcall-thread-context"

// `wasm32-wasip3` does not pass `+libcall-thread-context` when `-mno-libcall-thread-context` is used.

// RUN: %clang -### --target=wasm32-wasip3 --sysroot=/foo -mno-libcall-thread-context %s 2>&1 \
// RUN: | FileCheck -check-prefix=LINK_WASIP3_NO_LIBCALL_THREAD_CONTEXT %s
// LINK_WASIP3_NO_LIBCALL_THREAD_CONTEXT: "-cc1" {{.*}} "-target-feature" "-libcall-thread-context"
9 changes: 9 additions & 0 deletions clang/test/Preprocessor/wasm-target-features.c
Original file line number Diff line number Diff line change
Expand Up @@ -251,3 +251,12 @@
// RUN: | FileCheck %s -check-prefix=BLEEDING-EDGE-NO-SIMD128
//
// BLEEDING-EDGE-NO-SIMD128-NOT: #define __wasm_simd128__ 1{{$}}

// RUN: %clang -E -dM %s -o - 2>&1 \
// RUN: -target wasm32-unknown-unknown -mlibcall-thread-context \
// RUN: | FileCheck %s -check-prefix=LIBCALL-THREAD-CONTEXT
// RUN: %clang -E -dM %s -o - 2>&1 \
// RUN: -target wasm64-unknown-unknown -mlibcall-thread-context \
// RUN: | FileCheck %s -check-prefix=LIBCALL-THREAD-CONTEXT

// LIBCALL-THREAD-CONTEXT: #define __wasm_libcall_thread_context__ 1{{$}}
32 changes: 32 additions & 0 deletions lld/test/wasm/stack-pointer-abi.s
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# RUN: split-file %s %t
# RUN: llvm-mc -filetype=obj -triple=wasm32-unknown-unknown -o %t/use.o %t/use.s
# RUN: llvm-mc -filetype=obj -triple=wasm32-unknown-unknown -o %t/disallow.o %t/disallow.s
# RUN: llvm-mc -filetype=obj -triple=wasm32-unknown-unknown -o %t/start.o %t/start.s
# RUN: wasm-ld --libcall-thread-context -o %t/libcall.wasm %t/use.o %t/start.o
# RUN: obj2yaml %t/libcall.wasm | FileCheck %s --check-prefix=LIBCALL
# RUN: wasm-ld -o %t/global.wasm %t/disallow.o %t/start.o
# RUN: obj2yaml %t/global.wasm | FileCheck %s --check-prefix=GLOBAL

#--- start.s
.globl _start
_start:
.functype _start () -> ()
end_function

#--- disallow.s
.section .custom_section.target_features,"",@
.int8 1
.int8 45
.int8 22
.ascii "libcall-thread-context"

#--- use.s

.section .custom_section.target_features,"",@
.int8 1
.int8 43
.int8 22
.ascii "libcall-thread-context"

# LIBCALL: Name: __init_stack_pointer
# GLOBAL: Name: __stack_pointer
48 changes: 48 additions & 0 deletions lld/test/wasm/thread-context-abi-mismatch.s
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Test that linking object files with mismatched thread context ABIs fails with an error.

# RUN: split-file %s %t

# Test that the presence of an import of __stack_pointer from the env module is treated
# as an indication that the global thread context ABI is being used, even if the
# libcall-thread-context feature is not disallowed.

# RUN: llvm-mc -filetype=obj -triple=wasm32-unknown-unknown -o %t/start.o %t/start.s
# RUN: llvm-mc -filetype=obj -triple=wasm32-unknown-unknown -o %t/stack-pointer.o %t/stack-pointer.s
# RUN: not wasm-ld --libcall-thread-context %t/start.o %t/stack-pointer.o -o %t/fail.wasm 2>&1 | FileCheck %s

# Test that explicitly disallowing the libcall-thread-context feature causes linking to fail
# with an error when other files use the feature.

# RUN: llvm-mc -filetype=obj -triple=wasm32-unknown-unknown -o %t/disallow.o %t/disallow.s
# RUN: not wasm-ld --libcall-thread-context %t/start.o %t/disallow.o -o %t/fail.wasm 2>&1 | FileCheck %s

# CHECK: error: --libcall-thread-context is disallowed by {{.*}} because it uses globals for thread context rather than library function calls.

#--- start.s
.globl _start
_start:
.functype _start () -> ()
end_function

.section .custom_section.target_features,"",@
.int8 1
.int8 43
.int8 22
.ascii "libcall-thread-context"

#--- stack-pointer.s
.globaltype __stack_pointer, i32

.globl use_stack_pointer
use_stack_pointer:
.functype use_stack_pointer () -> ()
global.get __stack_pointer
drop
end_function

#--- disallow.s
.section .custom_section.target_features,"",@
.int8 1
.int8 45
.int8 22
.ascii "libcall-thread-context"
74 changes: 74 additions & 0 deletions lld/test/wasm/tls-libcall.s
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# RUN: llvm-mc -filetype=obj -triple=wasm32-unknown-unknown -o %t.o %s
# RUN: wasm-ld --libcall-thread-context --shared-memory -no-gc-sections -o %t.wasm %t.o
# RUN: obj2yaml %t.wasm | FileCheck %s
# RUN: llvm-objdump -d --no-print-imm-hex --no-show-raw-insn %t.wasm | FileCheck %s --check-prefix=DIS

.globl __wasm_get_tls_base
__wasm_get_tls_base:
.functype __wasm_get_tls_base () -> (i32)
i32.const 0
end_function

.globl _start
_start:
.functype _start () -> (i32)
call __wasm_get_tls_base
i32.const tls1@TLSREL
i32.add
i32.load 0
call __wasm_get_tls_base
i32.const tls2@TLSREL
i32.add
i32.load 0
i32.add
end_function

.section .tdata.tls1,"",@
.globl tls1
tls1:
.int32 1
.size tls1, 4

.section .tdata.tls2,"",@
.globl tls2
tls2:
.int32 2
.size tls2, 4

.section .custom_section.target_features,"",@
.int8 3
.int8 43
.int8 22
.ascii "libcall-thread-context"
.int8 43
.int8 11
.ascii "bulk-memory"
.int8 43
.int8 7
.ascii "atomics"


# CHECK: GlobalNames:
# CHECK-NEXT: - Index: 0
# CHECK-NEXT: Name: __init_stack_pointer
# CHECK-NEXT: - Index: 1
# CHECK-NEXT: Name: __init_tls_base
# CHECK-NEXT: - Index: 2
# CHECK-NEXT: Name: __tls_size
# CHECK-NEXT: - Index: 3
# CHECK-NEXT: Name: __tls_align

# DIS-LABEL: <__wasm_init_memory>:

# DIS-LABEL: <_start>:
# DIS-EMPTY:
# DIS-NEXT: call 4
# DIS-NEXT: i32.const 0
# DIS-NEXT: i32.add
# DIS-NEXT: i32.load 0
# DIS-NEXT: call 4
# DIS-NEXT: i32.const 4
# DIS-NEXT: i32.add
# DIS-NEXT: i32.load 0
# DIS-NEXT: i32.add
# DIS-NEXT: end
10 changes: 10 additions & 0 deletions lld/wasm/Config.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ class Symbol;
class DefinedData;
class GlobalSymbol;
class DefinedFunction;
class UndefinedFunction;
class DefinedGlobal;
class UndefinedGlobal;
class TableSymbol;
Expand Down Expand Up @@ -65,6 +66,7 @@ struct Config {
bool growableTable;
bool gcSections;
llvm::StringSet<> keepSections;
bool libcallThreadContext;
std::optional<std::pair<llvm::StringRef, llvm::StringRef>> memoryImport;
std::optional<llvm::StringRef> memoryExport;
bool sharedMemory;
Expand Down Expand Up @@ -252,6 +254,14 @@ struct Ctx {
// Used as an address space for function pointers, with each function that
// is used as a function pointer being allocated a slot.
TableSymbol *indirectFunctionTable;

// __wasm_set_tls_base
// Function used to set TLS base in libcall thread context modules.
UndefinedFunction *setTLSBase;

// __wasm_get_tls_base
// Function used to get TLS base in libcall thread context modules.
UndefinedFunction *getTLSBase;
};
WasmSym sym;

Expand Down
Loading