Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[native_toolchain_c][native_assets_builder] Consider adding paths to command-line utilities #1741

Open
dcharkes opened this issue Nov 20, 2024 · 1 comment

Comments

@dcharkes
Copy link
Collaborator

It would be nice if package:native_toolchain_c could rely on readelf, objdump, nm, etc. being available.

We've got two options to do this:

  1. Finally introduce our hook/doctor.dart and have package:native_toolchain_c discover the tools directly.
  2. Pass them in via config.nativeConfig.cCompiler.
  3. Do both, prefer 2, fall back to 1. (Which is what we do for the compiler, archiver, and linker.)

This would enable us to write expectXXX for package:native_toolchain_c that users can use.

==================================

It would be nice if package:native_assets_builder could rely on readelf, objdump, nm, etc. being available.

We've got two options to do this:

  1. Discover the tools directly on the file system.
  2. Pass them in via config.nativeConfig.cCompiler.
  3. Do both, prefer 2, fall back to 1. (Which is what we do for the compiler, archiver, and linker.)

This would enable us to write checks in the bundling tools that the dylibs are correct. #1740 (comment)

  • correct target arch
  • enough page size of Android
  • ...
@mkustermann
Copy link
Member

Just to clarify, the comment I made regarding verifying that shared library page size is correct for android (see #1740 (comment)) can be done without those tools.

The ELF format isn't that complicated and we could have a bit of logic that just reads it, not requiring users to have objdump etc installed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants