Skip to content

Skip certain definitions #553

@lenianiva

Description

@lenianiva

Is it possible to specify a list of symbols that should be ignored when generating Julia code?

I'm generating bindings for a header file from another program, where it has _Atomic declarations. Currently these declarations lead to

[ Info: Parsing headers...
[ Info: Processing header: ...
[ Info: Building the DAG...

ERROR: LoadError: type JuliaUnknown has no field sym
Stacktrace:
 [1] getproperty
   @ ./Base.jl:49 [inlined]
 [2] collect_dependent_system_nodes!(dag::ExprDAG, type::Clang.CLRecord, system_nodes::Dict{ExprNode, Int64})
   @ Clang.Generators ~/.julia/packages/Clang/kqsoL/src/generator/system_deps.jl:138
 [3] collect_dependent_system_nodes!(dag::ExprDAG, node::ExprNode{Clang.Generators.StructDefinition, Clang.CLStructDecl}, system_nodes::Dict{ExprNode, Int64})
   @ Clang.Generators ~/.julia/packages/Clang/kqsoL/src/generator/system_deps.jl:124
 [4] (::CollectDependentSystemNode)(dag::ExprDAG, options::Dict{String, Any})
   @ Clang.Generators ~/.julia/packages/Clang/kqsoL/src/generator/passes.jl:77
 [5] build!(ctx::Context, stage::Clang.Generators.BuildStage)
   @ Clang.Generators ~/.julia/packages/Clang/kqsoL/src/generator/context.jl:181
 [6] build!(ctx::Context)
   @ Clang.Generators ~/.julia/packages/Clang/kqsoL/src/generator/context.jl:172
 [7] top-level scope
   @ ~/Projects/test/generator.jl:27
 [8] include(fname::String)
   @ Main ./sysimg.jl:38
 [9] top-level scope
   @ REPL[6]:1

I tried output_ignorelist and it does not work. This error also doesn't say which symbols are causing issues.

The header file is https://github.com/leanprover/lean4/blob/master/src/include/lean/lean.h .

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions