Skip to content

Commit

Permalink
Allow profiler feature under wasm iff wasm_threads is enabled (#6643)
Browse files Browse the repository at this point in the history
The profiler requires threads, but works fine when wasm_threads are enabled.
  • Loading branch information
steven-johnson authored Mar 10, 2022
1 parent f6628aa commit 07dddb7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/LLVM_Runtime_Linker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1081,7 +1081,10 @@ std::unique_ptr<llvm::Module> get_initial_module_for_target(Target t, llvm::LLVM
modules.push_back(get_initmod_x86_amx_ll(c));
}
if (t.has_feature(Target::Profile)) {
user_assert(t.os != Target::WebAssemblyRuntime) << "The profiler cannot be used in a threadless environment.";
if (t.os == Target::WebAssemblyRuntime) {
user_assert(t.has_feature(Target::WasmThreads))
<< "The profiler requires threads to operate; enable wasm_threads to use this under WebAssembly.";
}
modules.push_back(get_initmod_profiler_inlined(c, bits_64, debug));
}
if (t.arch == Target::WebAssembly) {
Expand Down

0 comments on commit 07dddb7

Please sign in to comment.