You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This way, no changes are needed to any dependencies. It could also possibly replace the --libc option in system integration options if libc file is added to the end of the target quadruple, like aarch64-linux-android-lp64-libc.txt or something
Alternatives
Using --libc to set the libc file for the whole build could maybe work, but any tools which want to run on the host system (.target = b.resolveTargetQuery(.{}) + b.addRunArtifact()) get their libc file replaced which makes them fail to build.
Update every dependency to add a libc option, like described above.
Targeting android, zig doesn't provide a libc, so my application needs to use a libc.txt file:
The problem is that the harfbuzz module does not get the libc file, and then fails to compile.
Allowing my_app to pass a libc file would require adding a LazyPath option to harfbuzz and using it to setLibCFile:
Currently, zero libraries in allyourcodebase do this. This seems like an unresonable ask for libraries to implement.
Proposal
Instead, libc.txt could be part of 'target', so it gets automatically passed down correctly without opt-in from dependencies.
This way, no changes are needed to any dependencies. It could also possibly replace the
--libc
option in system integration options if libc file is added to the end of the target quadruple, likeaarch64-linux-android-lp64-libc.txt
or somethingAlternatives
--libc
to set the libc file for the whole build could maybe work, but any tools which want to run on the host system (.target = b.resolveTargetQuery(.{})
+b.addRunArtifact()
) get their libc file replaced which makes them fail to build.libc
option, like described above.b.graph.dependency_cache
, find every installed artifact, and set the libc file on each one: https://github.com/pfgithub/blockeditor/blob/9c4bf03fe706e3cf679b8ff41dd626637807eb74/packages/beui_impl_android/build.zig#L135-L143b.linkLibC()
->b.linkLibrary(b.standardLibCOption(.{}))
& update allb.dependency()
to.{ .target, .optimize, .libc = b.standardLibCOption(.{}) }
The text was updated successfully, but these errors were encountered: