Test cross compilation with proc-macro crates

ba8c377
Opened by Jeffrey Seyfried at 2024-12-28 16:54:34

In particular, test #37899.

  1. Can you actually somehow distinguish between target and host on proc-macro crates? What if you want to implement a feature for one given target architecture, independent from whether it gets created by cross compilation or normal compilation? How do build.rs scripts handle this?

    est31 at 2016-11-25 05:35:39

  2. @est31 I think we shouldn't support cross compiling proc-macro crates -- that is, we always compile proc-macro crates for the host architecture. This issue is calling for testing of cross compiled crates that depend on proc-macro crates (which are compiled for the host) as well as other dependencies (which are compiled for the target).

    Jeffrey Seyfried at 2016-11-25 05:47:35

  3. I've posted a stripped-down example program which triggers this error.

    Eric Kidd at 2016-11-26 13:38:25

  4. This seems like a E-needstest, probably sufficient to just have a run-make test I guess, which will then be tested on the cross test platforms. @jseyfried Does that sound correct? Please untag as needstest if that's wrong.

    Mark Rousskov at 2017-05-16 15:45:27

  5. @Mark-Simulacrum Yeah, that sounds correct -- a run-make test is probably best here.

    Jeffrey Seyfried at 2017-05-16 20:20:37

  6. Triage: not aware of anything here changing, but I'm also not an expert.

    Steve Klabnik at 2020-07-11 20:57:58