Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More verbose "Log Exclusions" Option? #532

Open
kkukshtel opened this issue Feb 29, 2024 · 1 comment
Open

More verbose "Log Exclusions" Option? #532

kkukshtel opened this issue Feb 29, 2024 · 1 comment

Comments

@kkukshtel
Copy link
Contributor

I'm having a hell of a time trying to generate bindings for https://github.com/memononen/fontstash, and all more normal ways of flipping defines and such aren't working. It could very well be my own cause of define stuff but with a mostly normal config nothing is being generated. However even with log-exclusions set I'm not seeing any information about functions that were visited and why they were or weren't emitted to the bindgen. Here's my rsp:

--config
latest-codegen
single-file
generate-aggressive-inlining
generate-file-scoped-namespaces
log-exclusions
log-potential-typedef-remappings
log-visited-files
generate-cpp-attributes
--additional
-Wno-ignored-attributes
-Wno-nullability-completeness
-Wunused-function

--include-directory
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include
/Library/Developer/CommandLineTools/usr/lib/clang/13.0.0/include/
./libs/sokol/src/sokol
./libs/sokol/src/
--define-macro
SOKOL_DLL
SOKOL_NO_ENTRY
SOKOL_TRACE_HOOKS
--namespace
Dinghy.Internal.Sokol
--libraryPath
sokol
--file
./libs/sokol/fontstash.h
--methodClassName
Fontstash
--output
../Dinghy.Core/src/generated/lib/sokol/Sokol.Fontstash.cs
--prefixStrip
sfons_
--traverse
./libs/sokol/fontstash.h

I get unused function warnings on stb_truetype (included from fontstash.h) but nothing from fontstash.h, even though nothing is emitted from fontash.h. Any indication from ClangSharp as to why would be great.

@kkukshtel
Copy link
Contributor Author

Bumping this again as I'm trying to generate for Box2D and getting no good information on why functions are being skipped:

Zinc.Bootstrapper: C:\Users\kylek\.dotnet\tools\ClangSharpPInvokeGenerator.EXE @box2d.rsp
Diagnostics for './libs/box2d/bindgen/box2d_bindgen_helper.h':
    ./libs/box2d/bindgen/box2d_bindgen_helper.h:1:26: warning: ISO C99 requires whitespace after the macro name [-Wc99-extensions]
    ./libs/box2d/bindgen\../src/box2d/include/box2d\base.h:16:10: warning: 'BOX2D_EXPORT' macro redefined [-Wmacro-redefined]
    ./libs/box2d/bindgen\../src/box2d/include/box2d\base.h:27:10: warning: 'B2_API' macro redefined [-Wmacro-redefined]
Processing './libs/box2d/bindgen/box2d_bindgen_helper.h'
Diagnostics for binding generation of ./libs/box2d/bindgen/box2d_bindgen_helper.h:
    Info: Visiting
    Info: Visiting C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.41.34120/include/vadefs.h
    Info: Visiting C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.41.34120/include/vcruntime.h
    Info: Visiting C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.41.34120/include/stdint.h
    Info: Visiting ./libs/box2d/bindgen/../src/box2d/include/box2d/base.h
    Info: Visiting C:/Program Files (x86)/Windows Kits/10/Include/10.0.22621.0/ucrt/corecrt.h
    Info: Visiting C:/Program Files (x86)/Windows Kits/10/Include/10.0.22621.0/ucrt/float.h
    Info: Visiting C:/Program Files (x86)/Windows Kits/10/Include/10.0.22621.0/ucrt/corecrt_math.h
    Info: Visiting ./libs/box2d/bindgen/../src/box2d/include/box2d/math_functions.h
    Info: Visiting ./libs/box2d/bindgen/../src/box2d/include/box2d/collision.h
    Info: Visiting ./libs/box2d/bindgen/../src/box2d/include/box2d/id.h
    Info: Visiting ./libs/box2d/bindgen/../src/box2d/include/box2d/types.h
    Info: Visiting ./libs/box2d/bindgen/../src/box2d/include/box2d/box2d.h

the rsp file:

--config
latest-codegen
single-file
exclude-funcs-with-body
generate-aggressive-inlining
log-exclusions
log-potential-typedef-remappings
log-visited-files
generate-cpp-attributes
--additional
-Wno-ignored-attributes
-Wno-nullability-completeness
-Wunused-function

--include-directory
C:/Program Files (x86)/Windows Kits/10/Include/10.0.22621.0/ucrt
./libs/box2d/src/include/box2d/
--define-macro
BOX2D_DLL
--namespace
Zinc.Internal.Box2D
--libraryPath
box2d

--file
./libs/box2d/bindgen/box2d_bindgen_helper.h
--methodClassName
Box2D
--output
./out/bindings/box2d/Box2D.cs
--traverse
./libs/box2d/src/include/box2d/box2d.h

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant