# \[RFC\] Optionally include object file generation in tvmc

**URL:** <https://discuss.tvm.apache.org/t/rfc-optionally-include-object-file-generation-in-tvmc/8120>\
**Category:** RFC\
**Created:** [October 8, 2020, 5:50pm UTC](https://discuss.tvm.apache.org/t/rfc-optionally-include-object-file-generation-in-tvmc/8120 "2020-10-08T17:50:45Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![giuseros](https://discuss.tvm.apache.org/user_avatar/discuss.tvm.apache.org/giuseros/32/803_2.png) [@giuseros](https://discuss.tvm.apache.org/u/giuseros)\
**Post date:** [October 8, 2020, 5:50pm UTC](https://discuss.tvm.apache.org/t/rfc-optionally-include-object-file-generation-in-tvmc/8120/1 "2020-10-08T17:50:45Z")

</div>

## Motivation

Currently `tvmc` will only produce a dynamic library version of the network, i.e., an `.so` file stored alongside the other artifacts. This library is usually dynamically linked to other applications.

With this change we want to add a flag to `tvmc` to get an object file (i.e., with a `.o` extension) as well as the dynamic library, to statically link against the target applications.

This will be very useful for bare-metal targets that cannot link against dynamic libraries.

## Summary of the change

**Standard behavior:** `tvmc compile mynetwork.tflite` → `mod.params`, `mod.so`, `mod.json`

**Enhanced behavior:** `tvmc compile --flag-name mynetwork.tflite` → `mod.params`, `mod.so`, **`mod.o`** , `mod.json`

## Possible names for the tvmc flag

Here is a list of possible flag names:

- `--bare-metal`
- `--object-file`
- `--static`

Feel free to add more, and let’s agree on one in particular

---

_[View the full topic](https://discuss.tvm.apache.org/t/rfc-optionally-include-object-file-generation-in-tvmc/8120)._
