Stream: cranelift

Topic: comdat


view this post on Zulip Carlo Kok (Aug 05 2020 at 06:47):

so I'm probably missing something obvious. But in cranelift in codegen\src\ir\entities.rs I added pub enum ComdatMode { .. } from module\src\data_context.rs which has use cranelift_codegen::ir;

I get: cannot find type ComdatMode in module ir

not found in ir

view this post on Zulip Carlo Kok (Aug 05 2020 at 06:48):

anyone got a hint on where I should look ?

view this post on Zulip bjorn3 (Aug 05 2020 at 07:34):

The path would be cranelift_codegen::ir::entities::ComdatMode. I think you should add it to cranelift_module though, as comdat doesn't influence codegen as far as I know. Only writing object files.

view this post on Zulip Carlo Kok (Aug 05 2020 at 07:35):

thanks. trying

view this post on Zulip Carlo Kok (Aug 05 2020 at 07:45):

is there a function or global variable symbol type I can use for the comdat api?

view this post on Zulip Carlo Kok (Aug 05 2020 at 07:46):

AnyEntity comes close, but really has too many options

view this post on Zulip Carlo Kok (Aug 05 2020 at 07:49):

I was thinking of something like:
add_comdat(&Self, main: FuncOrVarRef, mode: ComdatMode, symbols: &[FuncOrVarRef])

view this post on Zulip Carlo Kok (Aug 05 2020 at 07:49):

(On backend)


Last updated: Dec 23 2024 at 12:05 UTC