Closed
Description
Registering @alexcrichton's ideas from #137 (comment) so they don't get lost:
We've got the following state of affairs:
- This report saying we don't compile by default on alpine
- This report saying the same
- This comment indicating that some musl builds have
proc_macro
- This report saying that if
proc_macro2
doesn't link toproc_macro
then the dependencies ofproc_macro2
aren't ready for that.
I think it's sort of a bummer that this crate doesn't work by default on the standard musl target, and I think it'd be great to fix this. Here's an idea, though, of how we could get this working:
- Somehow in this crate's build script we deterine whether or not to link to
proc_macro
- This crate also indicates
links = "proc-macro2-04x"
- This crate's build script now prints out whether or not it links to
proc_macro
- Crates like
syn
have a build script. syn
reads the env varDEP_PROC_MACRO2_04X
, learning about whetherproc_macro
was linked.syn
's build script then prints out something likecargo:rustc-args=--cfg proc_macro_works
and is compiled appropriately
This is sort of heinously complex unfortunately though. It also requires this crate's build script to figure out whether to depend on proc_macro
or not (which I'm not sure how to do)
Metadata
Metadata
Assignees
Labels
No labels