-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Introduce ra_proc_macro_srv #3800
Conversation
|
||
[dependencies] | ||
ra_tt = { path = "../ra_tt" } | ||
ra_mbe = { path = "../ra_mbe" } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@matklad We need mbe here for parsing string to ra_tt::Token
which is used for lib_proc_macro bridge api.
CI failed in |
Maybe use |
The C code is used for a lock around #include <pthread.h>
#include <stdlib.h>
pthread_mutex_t __attribute__((weak)) rust_libloading_dlerror_mutex = PTHREAD_MUTEX_INITIALIZER;
void __attribute__((weak))
rust_libloading_dlerror_mutex_lock(void)
{
if (pthread_mutex_lock(&rust_libloading_dlerror_mutex) != 0) {
abort();
}
}
void __attribute__((weak))
rust_libloading_dlerror_mutex_unlock(void)
{
if (pthread_mutex_unlock(&rust_libloading_dlerror_mutex) != 0) {
abort();
}
} |
Another reason : We would need to get proc-macro symbols from these dylibs in different platform (linux, mac, windows). and using |
This is exactly the case where depending on 3d-party lib can save us a royal amount of pain :) |
Maybe |
Maybe we should have a cargo feature for enabling/disabling proc macro support, and could then do the deny_c check without that? |
That deny_c check is defined in environment variable, so we would have to separate two CI check action to support it. Anyway, we have to change our CI for the proc-macro-srv executable to be included in the release package. |
I'm ok with just disabling deny_c check. I've also opened an upstream issue
about making the c dep optional (which I think it doable).
…On Wed, 1 Apr 2020 at 13:02, Edwin Cheng ***@***.***> wrote:
Maybe we should have a cargo feature for enabling/disabling proc macro
support, and could then do the deny_c check without that?
That deny_c check is defined in environment variable, so we would have to
separate two CL check action to support it. Anyway, we have to change our
CI for the proc-macro-srv executable to be included in the release package.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#3800 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AANB3M56RVFG2Z4KS4QBS7TRKMNMJANCNFSM4LYOABKA>
.
|
f75afe2
to
84fb9b4
Compare
bors r+ |
Build succeeded |
This PR add preliminary for server side of proc macro :