diff options
| author | bors <bors@rust-lang.org> | 2020-03-17 18:27:26 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2020-03-17 18:27:26 +0000 |
| commit | 7ceebd98c6a15ae30e772eebb676b63ffa1a8122 (patch) | |
| tree | 4c762975c0da155553eb6e677b0b033fe37a8664 /src/test | |
| parent | 660326e9791d5caf3186b14521498c2584a494ab (diff) | |
| parent | afd374ff3608570cdbc8889a52299d52ee52c7e2 (diff) | |
| download | rust-7ceebd98c6a15ae30e772eebb676b63ffa1a8122.tar.gz rust-7ceebd98c6a15ae30e772eebb676b63ffa1a8122.zip | |
Auto merge of #69519 - 12101111:remove-proc-macro-check, r=nagisa
Don't use static crt by default when build proc-macro Don't check value of `crt-static` when build proc-macro crates, since they are always built dynamically. For more information, see https://github.com/rust-lang/cargo/issues/7563#issuecomment-591965320 I hope this will fix issues about compiling `proc_macro` crates on musl host without bring more issues. Fix https://github.com/rust-lang/cargo/issues/7563
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/ui/proc-macro/crt-static.rs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/test/ui/proc-macro/crt-static.rs b/src/test/ui/proc-macro/crt-static.rs new file mode 100644 index 00000000000..90e3d422b3c --- /dev/null +++ b/src/test/ui/proc-macro/crt-static.rs @@ -0,0 +1,16 @@ +// Test proc-macro crate can be built without addtional RUSTFLAGS +// on musl target +// override -Ctarget-feature=-crt-static from compiletest +// compile-flags: -Ctarget-feature= +// ignore-wasm32 +// build-pass +#![crate_type = "proc-macro"] + +extern crate proc_macro; + +use proc_macro::TokenStream; + +#[proc_macro_derive(Foo)] +pub fn derive_foo(input: TokenStream) -> TokenStream { + input +} |
