Skip to content

Commit

Permalink
jitlayers: use std::make_tuple instead of tuple constructor (#56287)
Browse files Browse the repository at this point in the history
this should be safer for the type deduction and fixes a build error for
macos on Yggdrasil
(JuliaPackaging/Yggdrasil#9660):

```
src/jitlayers.cpp:665:54: error: no viable constructor or deduction guide for deduction of template arguments of 'tuple'
  665 |         incompletemodules.insert(std::pair(codeinst, std::tuple(std::move(params), waiting)));
```
The Yggdrasil environment is a bit special with a rather new clang
(version 17) but an old macos sdk and I don't know exactly in which
circumstances this triggers. But I think `std::make_tuple` should be
more reliable when the tuple types are not specified.

cc: @fingolfin
  • Loading branch information
benlorenz authored Oct 22, 2024
1 parent 5b677a1 commit 7d4b2b7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/jitlayers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -662,7 +662,7 @@ static void jl_emit_codeinst_to_jit(
int waiting = jl_analyze_workqueue(codeinst, params);
if (waiting) {
auto release = std::move(params.tsctx_lock); // unlock again before moving from it
incompletemodules.insert(std::pair(codeinst, std::tuple(std::move(params), waiting)));
incompletemodules.insert(std::pair(codeinst, std::make_tuple(std::move(params), waiting)));
}
else {
finish_params(result_m.getModuleUnlocked(), params);
Expand Down

0 comments on commit 7d4b2b7

Please sign in to comment.