vcpkg icon indicating copy to clipboard operation
vcpkg copied to clipboard

Add rtti support to SKIA

Open omartijn opened this issue 2 years ago • 4 comments

This is necessary on UNIX platforms when using the skia library in an application built with rtti itself.

  • [X] Changes comply with the maintainer guide.
  • [X] SHA512s are updated for each updated download.
  • [X] The "supports" clause reflects platforms that may be fixed by this new version.
  • [X] Any fixed CI baseline entries are removed from that file.
  • [X] Any patches that are no longer applied are deleted from the port's directory.
  • [X] The version database is fixed by rerunning ./vcpkg x-add-version --all and committing the result.
  • [X] Only one version is added to each modified port's versions file.

omartijn avatar Feb 12 '24 12:02 omartijn

Is this really a feature or a triplet setting?

dg0yt avatar Feb 14 '24 06:02 dg0yt

Is this really a feature or a triplet setting?

I think having this as a triplet setting is quite a nice idea, and I support that as an idea.

However, we already have other ports that have this as a feature, e.g. llvm, glslang, bullet3, mesa, halide`. For consistency, I'd argue we merge it like this for now.

If we turn this into a triplet-feature we also need to ensure it's properly supported for all ports, which I think is quite a bit of work, so I think that deserves it's own PR.

omartijn avatar Feb 15 '24 08:02 omartijn

At least I'm surprised to see EXTRA_CXX_CFLAGS getting quick "approval", despite the usual "follow CMake toolchain settings". Add did you check that there isn't some explicit gn config stuff? Does the flag depend on actual compiler?

dg0yt avatar Feb 15 '24 15:02 dg0yt

Is this specific to clang, https://github.com/llvm/llvm-project/issues/66117?

dg0yt avatar Feb 16 '24 04:02 dg0yt

fwiw, the official docs https://skia.org/docs/user/build/#quickstart have an example doing

bin/gn gen out/RTTI     --args='extra_cflags_cc=["-frtti"]'

Which doesn't seem like a particularly sane way to do this.

There is a gn config in skia/gn/portable/BUILD.gn for add_rtti that is applied to the dng_sdk vendored dependency. but there doesn't seem to be a way to enable it globally for all targets in the upstream gn build.

ADKaster avatar Aug 05 '24 15:08 ADKaster

@ADKaster The question is whether a port feature should add compiler flags.

Triplet and cmake toolchain control the compiler flags. Even per-port settings are possible. The skia port already passes cmake toolchain settings into gn.

dg0yt avatar Aug 05 '24 16:08 dg0yt