Skip to content

Commit 24b8ca2

Browse files
committed
Prototype julia function when compiling to avoid implicit declaration warning
1 parent d33e25c commit 24b8ca2

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/StaticCompiler.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,9 @@ function generate_executable(f, tt, path=tempname(), name=GPUCompiler.safe_name(
377377
# Write a minimal wrapper to avoid having to specify a custom entry
378378
wrapper_path = joinpath(path, "wrapper.c")
379379
f = open(wrapper_path, "w")
380-
print(f, """int main(int argc, char** argv)
380+
print(f, """int julia_$name(int argc, char** argv);
381+
382+
int main(int argc, char** argv)
381383
{
382384
julia_$name(argc, argv);
383385
return 0;

0 commit comments

Comments
 (0)