Skip to content

Commit df04a07

Browse files
committed
Mark all functions as DECL_PUBLIC such that they can be linked against.
This will change when we implement visibility but the main method will be reserved case that it will always be DECL_PUBLC.
1 parent 9a3ad29 commit df04a07

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

gcc/rust/backend/rust-compile-item.h

+5-2
Original file line numberDiff line numberDiff line change
@@ -138,10 +138,13 @@ class CompileItem : public HIRCompileBase
138138
// convert to the actual function type
139139
auto compiled_fn_type = TyTyCompile::compile (ctx->get_backend (), fnType);
140140

141+
unsigned int flags = 0;
142+
flags |= Backend::function_is_visible;
143+
144+
std::string asm_name = function.function_name;
141145
Bfunction *fndecl
142146
= ctx->get_backend ()->function (compiled_fn_type, function.function_name,
143-
"" /* asm_name */, 0 /* flags */,
144-
function.get_locus ());
147+
asm_name, flags, function.get_locus ());
145148
ctx->insert_function_decl (function.get_mappings ().get_hirid (), fndecl);
146149

147150
// setup the params

0 commit comments

Comments
 (0)