Skip to content

Target-specific user defines? #2790

@simolus3

Description

@simolus3

User defines are typically used to control how a hook compiles native code. Sometimes, one might want to use different options depending on the target operating system or architecture. So it would potentially be helpful to have a unified system for OS or ABI-specific user defines, e.g.

# Expect sqlite3 to be linked statically, except on Android where we should load it.
hooks:
  user_defines:
    sqlite3:
      source: executable
  on_platform:
    - os: android
      user_defines:
        source: system

Of course, hooks could implement a similar mechanism on their own. But given that this could come up frequently, maybe implementing it in hooks_runner would be a more elegant solution.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions