Skip to content

Allow compilation with foreign object files #4129

@zbaylin

Description

@zbaylin

Desired Behavior

Per my discussion with @rgrinberg on Discord earlier, as of now in order to include an object file in compilation, it first needs to be embedded in a .a file with ar.

My thought was to add a (foreign_objects <foreign-objects-list>) field that behaves the same way as (foreign_archives <foreign-archives-list>), except with .o files.

Example

dune:

(library
 (name mylib)
 (foreign_objects myobject.o))

(rule
 (targets myobject.o)
 (action ...))

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issueGood for contributing for the first time to the Dune codebase

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions