Check for proc_macro before -Ctarget-features=+crt-static#74179
Check for proc_macro before -Ctarget-features=+crt-static#74179bjorn3 wants to merge 1 commit intorust-lang:masterfrom
Conversation
This makes it possible to compile proc macros when -Ctarget-features=+crt-static is used
|
r? @oli-obk (rust_highfive has picked a reviewer for you, use r? to override) |
|
Do you think it's reasonable to build a test for this behaviour? I worry that other subtle changes may break this again, but that may be overcautious. |
|
r? @petrochenkov (I think one proper solution here is supporting per crate or per crate type rustc flags in cargo.) |
|
This only changes behaviour for proc-macros, which are not guaranteed to be usable for anything other than rustc usage anyway. We could make proc-macros executables if we wanted or even use our own object format. If this were to apply to dylibs this could indead break stuff, but for proc-macros this is solely a bug fix. |
|
Well, yeah, but rust-lang/cargo#7811 and rust-lang/cargo#8441 are on its way, and I'd want to develop some holistic solution to this on rustc side, so I'll take a liberty to close this for now, it's not super urgent. In general, I still think rustc is a wrong abstraction level here, it the user explicitly says to build a proc macro crate with |
This makes it possible to compile proc macros when -Ctarget-features=+crt-static is used