loupeteam/ASPython

feat[CmdLineExportLib]: Optimize argument-handling / Allow libraries to be referenced in projects

Flashmueller opened this issue · 2 comments

Hi,

First of all, thank you for sharing this repository.

We would like to use the CmdLineExportLib but need to make some adjustments to fit our needs.
I would like to discuss the adjustments with you to figure out if we can make a PR to your repo:

  1. When the buildMode is set to 'None', it should not be necessary to pass a buildConfig.
  2. If buildMode is set to 'Build' or 'Rebuild' and no buildConfig is given, all configurations should be built.
  3. The binaries of a library should be exportable even if the source is included as a reference.

Looking forward to your response.

Best regards,
Stefan

Hi! I'm glad it may help you!

That all sounds reasonable. There are a few considerations:

  • A library can be built and exported for multiple targets, typically SG4 and Arm

  • The export will pick an arbitrary configuration that has been built for each target.. might be the first alphabetically?

  • Each configuration can have different compiler options which means the library might have inconsistent binaries.

  • I don't think the current exporter knows about the project configurations, so it would need to read the project to know what to build

Hi,
Thank you for your quick response.

A library can be built and exported for multiple targets, typically SG4 and ARM

Yes, we typically develop and export our libraries from projects where we have SG4-Intel and SG4-ARM configurations in place. Before exporting, we perform a batch-rebuild to generate the binaries for both architectures, and then we export the binaries.
I was not aware that different compiler options could lead to inconsistencies in the binaries, but of course, that could happen...

I'll conduct further investigation in our pipeline environment to determine if and what changes could be made to improve usability without introducing the risk of unintended results.