Skip to content

Filter platform-specific predefined macros in exdef #26

Description

@grian32

Problem

exdef uses clang -dM -E, which includes compiler/platform predefined macros alongside the header-defined constants. The code already skips linux and unix, but macOS/Windows-specific predefined macros can still leak into generated .gl3 output.

Tasks

  • Identify common macOS predefined macros that should be excluded.
  • Identify common Windows/MSVC/clang-cl-style predefined macros that should be excluded.
  • Replace the hardcoded linux/unix check with a clearer platform/predefined macro filter.
  • Keep user header defines with similar-looking names from being accidentally filtered if possible.
  • Add exdef tests/fixtures for platform predefined macro filtering.

Refs: cli/exdef.go.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingcliCLI and build commandsinteropC/foreign interop

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions